Advertisement
Guest User

Untitled

a guest
Oct 21st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. from Cryptodome.Cipher import AES
  2.  
  3. # Decryption
  4. def decrypt(k):
  5. ct = "0b09185d95179a8349dcbf4fbd692efbc5dec015013e7f8d33fd0fa16972ef71"
  6. ct = bytes.fromhex(ct)
  7. aes = AES.new((k + k[:6]).encode(), AES.MODE_ECB)
  8. msg = aes.decrypt(ct)
  9. return msg
  10.  
  11. u = input("Enter your username: ")
  12. p = input("Enter the password: ")
  13.  
  14. if u != "admin":
  15. print("Invalid Username")
  16. exit()
  17.  
  18. for c in p:
  19. if c.isnumeric():
  20. exit()
  21.  
  22. flag = p
  23. key = ""
  24. for c in flag:
  25. key += str(ord(c))
  26.  
  27. key = int(key)
  28.  
  29. if key % 26953030255659232628 == 0 and key > 26953030255659232627:
  30. msg = decrypt(p)
  31. print(msg)
  32. else:
  33. print("WRONG KEY")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement