SHARE
TWEET

Not so good Decryption Script

a guest Oct 3rd, 2018 30 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def decrypt():
  2.  
  3.     key_array = [0x0A, 0x19, 0x59, 0x2D, 0x6C, 0x59, 0x6F, 0xFA, 0x8B, 0x6F, 0x9B, 0xFF, 0x37, 0x9B, 0xBD, 0x7B, 0x59, 0x4B, 0x7B, 0xDD, 0x0F, 0x64, 0x91, 0xC7, 0xD6, 0x9C, 0x6F, 0x7B, 0x9C, 0x1, 0x9C, 0x91, 0x79, 0xC7, 0xC8, 0xC9, 0xDF, 0xE1, 0xFA, 0xFF, 0x4, 0x8, 0x59, 0xE6, 0x64, 0x6D, 0x37, 0x9B, 0x38, 0x81, 0x2D, 0x81, 0x65, 0x7D, 0x66, 0x9A, 0x6F, 0xBD, 0x65, 0x59, 0x4B, 0x2D, 0x1A, 0x63, 0x59, 0x7B, 0x65, 0x59, 0x59, 0x0B, 0x4E, 0x85, 0x8C, 0x91, 0x88, 0x59, 0x0C, 0x1, 0x4E, 0x3A, 0x0D, 0x58, 0x38, 0x16, 0x91, 0x57, 0x7E, 0x68, 0x6A, 0x55, 0x42, 0x55, 0x5D, 0xC5, 0x9E, 0x4E, 0x17, 0x3B, 0x0F, 0x42, 0x0, 0x0, 0x0, 0x0]
  4.    
  5.    
  6.     data_array = [0x41, 0x19, 0x0a, 0x2d, 0x20, 0x59, 0x5f, 0xfa, 0x81, 0x6f, 0xcf, 0xff, 0x61, 0x9b, 0xd8, 0x7b, 0x2b, 0x4b, 0x46, 0xdd, 0x3d, 0x64, 0xa0, 0xc7, 0xf8, 0x9c, 0x5f, 0x7b, 0x96, 0x01, 0xcf, 0x91, 0x0d, 0xc7, 0xa9, 0xc9, 0xad, 0xe1, 0x8e, 0xff, 0x0e, 0x08, 0x02, 0xe6, 0x11, 0x6d, 0x6a, 0x9b, 0x02, 0x81, 0x7f, 0x81, 0x00, 0x7d, 0x10, 0x9a, 0x0a, 0xbd, 0x17, 0x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, 0x2e, 0x00, 0x62, 0x00, 0x63, 0x19, 0x37, 0x2d, 0x4c, 0x59, 0x42, 0xfa, 0xab, 0x6f, 0xcf, 0xff, 0x5f, 0x9b, 0xcf, 0x7b, 0x3c, 0x4b, 0x1a, 0xdd, 0x6b, 0x64, 0xab, 0xc7, 0xf6, 0x9c, 0x2c, 0x7b, 0xda, 0x01, 0xac, 0x91, 0x70, 0xc7, 0xf4, 0xc9, 0x99, 0xe1, 0xc3, 0xff, 0x3a, 0x08]
  7.  
  8.  
  9.        
  10.     loop = len(data_array)
  11.     location = 0                   
  12.     i = 0
  13.     xor_array = []
  14.    
  15.     print "XORing Data...\n"
  16.                             # Get value from div % 100
  17.     for item in data_array:
  18.         if location == len(key_array):
  19.             location = 0
  20.         if i == loop:
  21.             break
  22.         data = item ^ key_array[location] # Get XOR key using value from div / 10  
  23.         xor_array.append(chr(data))                
  24.         i = i + 1;         
  25.         location = location + 1
  26.  
  27.     xor_array = ' '.join(xor_array).replace('\x00','')
  28.     xor_array = xor_array.replace(' ','')
  29.     xor_array = xor_array.replace(' ',' ')
  30.     print xor_array
  31.     print "\n"
  32.     print "Finished Decrypting Data!\n"
  33.  
  34. def main():
  35.    
  36.     print "A few assumptions are made here:\n"
  37.     print " - The input data is from the start of the file (AKA XOR'ed with 0x0A)"
  38.     print " - The key never changes"
  39.     print " - The correct hex data is taken from the file\n"
  40.     print "Simply copy the hex data of the key and array and put them into their respective arrays"
  41.     print "And yes, it is a very hacky method;"
  42.     print "I planned to have it so the data was read from a file, directly into an array, however it wasn't recognizing the data as hex"
  43.     print "There are definitely better ways to do this\nIncluding reading the keys directly from the EXE, assuming it doesn't move\n"
  44.     print "---------------------\nTVer = Version\nStart = Execution Begins\n[u] = Username\n[h] = Handle?\n[pid] = Process ID\n[pn] = Process Name\n[t] = Thread?\n---------------------\n"
  45.  
  46.     decrypt()
  47.  
  48. if __name__ == "__main__":
  49.     main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top