Guest User

Untitled

a guest
Mar 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. program = True
  2. while program == True:
  3. menuinput = input("""Would you like to encrypt or decrypt?""")
  4. menuinput2 = menuinput.lower()
  5. if menuinput2 == "encrypt":
  6. clear_text = input("CLEARTEXT: ")
  7. clear_text = clear_text.lower()
  8. cipher_text = clear_text.replace("a","{å/Ω+")
  9. cipher_text = cipher_text.replace("b","¥1")
  10. cipher_text = cipher_text.replace("c","≈2")
  11. cipher_text = cipher_text.replace("d","∑+")
  12. cipher_text = cipher_text.replace("e","{√1")
  13. cipher_text = cipher_text.replace("f","¨2")
  14. cipher_text = cipher_text.replace("g","ß+")
  15. cipher_text = cipher_text.replace("h","®1")
  16. cipher_text = cipher_text.replace("i","{œ2")
  17. cipher_text = cipher_text.replace("j","π+")
  18. cipher_text = cipher_text.replace("k","ø1")
  19. cipher_text = cipher_text.replace("m","µ+")
  20. cipher_text = cipher_text.replace("l","˜2")
  21. cipher_text = cipher_text.replace("n","¬1")
  22. cipher_text = cipher_text.replace("o","{˚2")
  23. cipher_text = cipher_text.replace("p","∆+")
  24. cipher_text = cipher_text.replace("q","ˆ1")
  25. cipher_text = cipher_text.replace("r","˙2")
  26. cipher_text = cipher_text.replace("s","©+")
  27. cipher_text = cipher_text.replace("t","ƒ1")
  28. cipher_text = cipher_text.replace("u","{´2")
  29. cipher_text = cipher_text.replace("v","∂+")
  30. cipher_text = cipher_text.replace("w","ç1")
  31. cipher_text = cipher_text.replace("x","∫2")
  32. cipher_text = cipher_text.replace("y","å+")
  33. cipher_text = cipher_text.replace("z","Ω\å1")
  34. lowercipher = clear_text.lower()
  35. print("""Encrypted Text: """+ cipher_text)
  36. print()
  37. print("""Original text: """+ clear_text)
  38. elif menuinput2 == "decrypt":
  39. clear_text = input("ENCRYPTED STRING: ")
  40. cipher_text = clear_text.replace("{å/Ω+","a")
  41. cipher_text = cipher_text.replace("¥1","b")
  42. cipher_text = cipher_text.replace("≈2","c")
  43. cipher_text = cipher_text.replace("∑+","d")
  44. cipher_text = cipher_text.replace("{√1","e")
  45. cipher_text = cipher_text.replace("¨2","f")
  46. cipher_text = cipher_text.replace("ß+","g")
  47. cipher_text = cipher_text.replace("®1","h")
  48. cipher_text = cipher_text.replace("{œ2","i")
  49. cipher_text = cipher_text.replace("π+","j")
  50. cipher_text = cipher_text.replace("ø1","k")
  51. cipher_text = cipher_text.replace("˜2","l")
  52. cipher_text = cipher_text.replace("µ+","m")
  53. cipher_text = cipher_text.replace("¬1","n")
  54. cipher_text = cipher_text.replace("{˚2","o")
  55. cipher_text = cipher_text.replace("∆+","p")
  56. cipher_text = cipher_text.replace("ˆ1","q")
  57. cipher_text = cipher_text.replace("˙2","r")
  58. cipher_text = cipher_text.replace("©+","s")
  59. cipher_text = cipher_text.replace("ƒ1","t")
  60. cipher_text = cipher_text.replace("{´2","u")
  61. cipher_text = cipher_text.replace("∂+","v")
  62. cipher_text = cipher_text.replace("ç1","w")
  63. cipher_text = cipher_text.replace("∫2","x")
  64. cipher_text = cipher_text.replace("å+","y")
  65. cipher_text = cipher_text.replace("Ω\å1","z")
  66. print("ORIGINAL TEXT: " + clear_text)
  67. print("UNENCRYPTED STRING: " + cipher_text)
Add Comment
Please, Sign In to add comment