Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Do you wish to encrypt, decrypt, or brute force a message?
- Enter your message:
- Your translated text is:
- 1 LSaHc! Lipps.
- 2 KRZGb! Khoor.
- 3 JQYFa! Jgnnq.
- 4 IPXEZ! Ifmmp.
- 5 HOWDY! Hello.
- 6 GNVCX! Gdkkn.
- 7 FMUBW! Fcjjm.
- 8 ELTAV! Ebiil.
- 9 DKSzU! Dahhk.
- 10 CJRyT! CZggj.
- 11 BIQxS! BYffi.
- 12 AHPwR! AXeeh.
- 13 zGOvQ! zWddg.
- 14 yFNuP! yVccf.
- 15 xEMtO! xUbbe.
- 16 wDLsN! wTaad.
- 17 vCKrM! vSZZc.
- 18 uBJqL! uRYYb.
- 19 tAIpK! tQXXa.
- 20 szHoJ! sPWWZ.
- 21 ryGnI! rOVVY.
- 22 qxFmH! qNUUX.
- 23 pwElG! pMTTW.
- 24 ovDkF! oLSSV.
- 25 nuCjE! nKRRU.
- Do you wish to encrypt, decrypt, or brute force a message?
- Enter your message:
- Your translated text is:
- 1 LSAHC! LIPPS.
- 2 LSAHC! LIPPS.KRZGB! KHOOR.
- 3 LSAHC! LIPPS.KRZGB! KHOOR.JQYFA! JGNNQ.
- 4 LSAHC! LIPPS.KRZGB! KHOOR.JQYFA! JGNNQ.IPXEZ! IFMMP.
- 5 LSAHC! LIPPS.KRZGB! KHOOR.JQYFA! JGNNQ.IPXEZ! IFMMP.HOWDY! HELLO.
- 6 LSAHC! LIPPS.KRZGB! KHOOR.JQYFA! JGNNQ.IPXEZ! IFMMP.HOWDY! HELLO.GNVCX!
- GDKKN.
- 7 LSAHC! LIPPS.KRZGB! KHOOR.JQYFA! JGNNQ.IPXEZ! IFMMP.HOWDY! HELLO.GNVCX!
- GDKKN.FMUBW! FCJJM.
- 8 LSAHC! LIPPS.KRZGB! KHOOR.JQYFA! JGNNQ.IPXEZ! IFMMP.HOWDY! HELLO.GNVCX!
- GDKKN.FMUBW! FCJJM.ELTAV! EBIIL.
- 9 LSAHC! LIPPS.KRZGB! KHOOR.JQYFA! JGNNQ.IPXEZ! IFMMP.HOWDY! HELLO.GNVCX!
- GDKKN.FMUBW! FCJJM.ELTAV! EBIIL.DKSZU! DAHHK.
- alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- message = ""
- encryptedmessage = " "
- decryptedmessage = " "
- keynumber = 0
- count = 1
- number = 0
- def encrypt():
- global message
- global encryptedmessage
- global keynumber
- print()
- print()
- message = str(input("Enter your message:"))
- print()
- print()
- keynumber = int(input("Enter the key number (1-26)"))
- print()
- print()
- for i in message:
- position = alphabet.find(i)
- if position == -1:
- encryptedmessage += i
- else:
- newPosition = (position + keynumber) % 26
- encryptedmessage += alphabet[newPosition]
- print("Your translated text is:")
- print(encryptedmessage)
- def decrypt():
- global message
- global encryptedmessage
- global decryptedmessage
- global keynumber
- message = str(input("Enter your message:"))
- print()
- print()
- print()
- print()
- keynumber = int(input("Enter the key number (1-26)"))
- print()
- print()
- print()
- print()
- for i in message:
- position = alphabet.find(i)
- if position == -1:
- decryptedmessage += i
- else:
- newPosition = (position - keynumber) % 26
- decryptedmessage += alphabet[newPosition]
- print("Your translated text is:")
- print(decryptedmessage)
- def brute():
- global message
- global encryptedmessage
- global decryptedmessage
- global keynumber
- global count
- global number
- keynumber = 1
- print()
- print()
- message = str(input("Enter your message:"))
- print()
- print()
- print("Your translated text is:")
- while keynumber < 26:
- for i in message:
- position = alphabet.find(i)
- if position == -1:
- decryptedmessage += i
- else:
- newPosition = (position - keynumber) % 26
- decryptedmessage += alphabet[newPosition]
- print(str(keynumber) + decryptedmessage)
- keynumber = keynumber + 1
- action = input("Do you wish to encrypt, decrypt, or brute force a message?")
- if action == "encrypt":
- encrypt()
- if action == "decrypt":
- decrypt()
- if action == "brute":
- brute()
Add Comment
Please, Sign In to add comment