ankit_anubhav

AndyPandy decryption routine example

Jun 17th, 2019
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. #python 2.7
  2. import sys
  3. key1 = """<>@_;:,.-+*^?=)(|AB&%$D\"!wkyxzvutsrqponmlihgfedcba~123456789FUCKT/ RGXQJjNHILEWOVSM"""
  4. key2 = """0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ|:./ $#]%>&\";-\\[()~@'"""
  5.  
  6. #; function: cnc_build_connection at 0x804915f -- 0x8049374
  7. # 0x804915f: 55 push ebp
  8. # 0x8049160: 89 e5 mov ebp, esp
  9. # 0x8049162: 57 push edi
  10. # 0x8049163: 53 push ebx
  11. # 0x8049164: 81 ec 10 01 00 00 sub esp, 0x110
  12. # 0x804916a: 83 ec 04 sub esp, 4
  13. # 0x804916d: 6a 00 push 0
  14. # 0x804916f: 6a 03 push 3
  15. # 0x8049171: ff 75 08 push dword ptr [ebp + 8]
  16. # 0x8049174: e8 d3 fc 00 00 call 0x8058e4c <fcntl>
  17. # 0x8049179: 83 c4 10 add esp, 0x10
  18. # 0x804917c: 89 45 e8 mov dword ptr [ebp - 0x18], eax
  19. # 0x804917f: 8d 45 88 lea eax, [ebp - 0x78]
  20. # 0x8049182: 50 push eax
  21. # 0x8049183: 68 7a f5 05 08 push 0x805f57a ; "D*xz)y^!|*?A)uT?!D"
  22. # 0x8049188: e8 97 f3 ff ff call 0x8048524 <enc_decode>
  23.  
  24. # c2 is "D*xz)y^!|*?A)uT?!D"
  25.  
  26. # encrypted_string = "D*xz)y^!|*?A)uT?!D"
  27. # andypandy.py "D*xz)y^!|*?A)uT?!D"
  28. encrypted_string = sys.argv[1]
  29. decrypted_string = ""
  30.  
  31. for c in encrypted_string:
  32. decrypted_string = decrypted_string + key2[key1.find(c)]
  33. print encrypted_string + " after decryption is " + decrypted_string
Add Comment
Please, Sign In to add comment