Python253

death_of_privacy_2019

Mar 2nd, 2024 (edited)
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.94 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. # File Name: Death of Privacy (2019)
  3. # Author: Python253
  4.  
  5. """
  6. Cicada3301 Decryption Script
  7.  
  8. This script decrypts the final provided Cicada3301 ciphertexts using the CAST-5 algorithm
  9. with the key "EMERGE" and displays the decrypted messages in the terminal.
  10.  
  11. Requirements:
  12. - Python 3
  13. - PyCryptodome library (install using: pip install pycryptodome)
  14.  
  15. Usage:
  16. 1. Ensure the required libraries are installed.
  17. 2. Run the script.
  18.  
  19. Additional Notes: https://pastebin.com/TbkHwySL
  20. """
  21.  
  22. from Crypto.Cipher import CAST
  23. from base64 import b64decode
  24.  
  25. def decrypt_ciphertext(ciphertext, key):
  26.     cipher = CAST.new(key.encode(), CAST.MODE_ECB)
  27.     decrypted_message = cipher.decrypt(b64decode(ciphertext)).decode('utf-8')
  28.     return decrypted_message.rstrip('\x00')  # Remove padding
  29.  
  30. # Key
  31. key = "EMERGE"
  32.  
  33. # List of ciphertexts
  34. ciphertexts = [
  35.     "RyKG0fBRAcIn66bQ3CQlX2dWV6+lVQYFcGsKBEP9u8gY37ISHDeI+hKgXhAhtFAzUwsh6Q59+1ZS XysGEgIyvw4I2QEcSOWh",
  36.     "9Ry/lPbEbM91PFu5heorJtoQEj8hQM/9+6FIxibhb0Tq4cFl57Bij0HpAmwsAkZ2rojayosu+vul p8x4BvTq6CGEamFVzcfz1lp1RfiiN2aSK3mLILtgOwUDEcqwhH3WXen8ptUDuphzQ62RVtunLQ==",
  37.     "xcoCxZCMWAmVA3Xx20FgF8ZDRqoyoOEwB1FyAkgJNv9+6RncUSTmz1tv+IJBeGvg",
  38.     "q9C74tNACOd3YH+SzcF6WoKh4CvksBEf4bBvExprALZVpej3xjE7oEpSbnSSrkgCI7BCBS0YpQo+ qOzgMw2hTQ==",
  39.     "wIbxQAJETCSYuia9HKyLnukC7dlLw3+kFTLSUM+fAFS8fvDnD+ON2wVivtB4JSjgLfnDZvpxl1ey veIOBrIIjQ==",
  40.     "4mP0eNt9/bplWXxygP7tspRKpdgyQA4h9ubvUMnNxUM8nBEhr49IP8Nrf9zS/lw9ercJPF8gySRc O312c6x+4KgCPFBLR+sl3M97mDKNDiDFaMMqNtaUltsefk22VKq4Pqjs4DMNoU0=",
  41.     "r3S0H+SW0CwfyiRiB0vSYOYVzpYEIepjvYN/rdOM6sdlT1j0E8amkNsQ3rnMS6AkGh5iOTnbYFlr 0tZIAfcNLrFw48tsKmUv",
  42.     "/U5ofW6tQt8xqLc9mbuI9uF3KSmJacGmnh0xmaoK6KeIob+yTvIUcg==",
  43.     "/U5ofW6tQt/u61bbwtLpclx67PEq6Wjy"
  44. ]
  45.  
  46. # Decrypt and display messages
  47. for i, ciphertext in enumerate(ciphertexts, start=1):
  48.     decrypted_message = decrypt_ciphertext(ciphertext, key)
  49.     print(f"{i}:\n{decrypted_message}\n")
  50.  
  51.  
Add Comment
Please, Sign In to add comment