Advertisement
Guest User

reversing ctf shl offline

a guest
Aug 26th, 2019
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. # uncompyle6 version 3.3.5
  2. # Python bytecode 3.7 (3394)
  3. # Decompiled from: Python 2.7.16 (default, Apr 6 2019, 01:42:57)
  4. # [GCC 8.3.0]
  5. # Embedded file name: client.py
  6. # Size of source mod 2**32: 1449 bytes
  7. checked2 = [
  8. 9887454823508319666176L, 288172475648682933383442546271715328L, 142788163609707759784588649053552640L, 167644010141872405086208L, 2367687367491881398609906326124363776L, 15370263527767281493147526365184L, 9636902969440640078552601187032498176L, 4776913109852041418248056622882488320L]
  9. checked1 = [65536, 123904, 118784, 123904, 99328, 113664]
  10. checked0 = [65612, 123953, 118859, 123955]
  11. checked4 = [122, 59, 99, 107, 105, 122, 75]
  12. user_input = input('Masukan Serial key: ')
  13. mentah_data = user_input.split('#')
  14.  
  15. def _print(data):
  16. print(data)
  17. exit(0)
  18.  
  19.  
  20. if len(mentah_data) != 4:
  21. _print('Hallo? who are you?')
  22. if len(mentah_data[1]) != len(checked1):
  23. _print('Sorry Who are')
  24. if len(mentah_data[0]) != len(checked2):
  25. _print('Ha? Halo')
  26. if len(mentah_data[2]) != len(checked0):
  27. _print('Hallo??')
  28. if len(mentah_data[3]) != len(checked4):
  29. _print('HEYYY!! YOU ARE WRONG!')
  30. for c1 in range(len(mentah_data[0])):
  31. if ord(mentah_data[0][c1]) << ord(mentah_data[0][c1]) != checked2[c1]:
  32. _print('NO!')
  33.  
  34. for c2 in range(len(checked1)):
  35. if ord(mentah_data[1][c2]) << 10 != checked1[c2]:
  36. _print('No!')
  37.  
  38. for c3 in range(len(mentah_data[2])):
  39. if ord(mentah_data[2][c3]) + checked1[c3] != checked0[c3]:
  40. _print('Noooo!')
  41.  
  42. for c4 in range(len(mentah_data[3])):
  43. if ord(mentah_data[3][::-1][c4]) ^ len(checked2) != checked4[c4]:
  44. _print('Big NO!')
  45.  
  46. print("Here's your Flag: CTFSHL2019{" + user_input.replace('#', '_') + '}')
  47. # okay decompiling client.pyc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement