Created
June 5, 2020 10:36
-
-
Save AdaniKamal/6a0bba50dc1d251caa25b10c578142c9 to your computer and use it in GitHub Desktop.
Revisions
-
AdaniKamal created this gist
Jun 5, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,67 @@ #!/usr/bin/python import pyfiglet #Start ascii = pyfiglet.figlet_format("R3in3", font = "banner3-D" ) print(ascii) print("By: adanikamal\n") checkquit = True #ROT FUNCTION LOWER def rotl(s): listA = [] abc = "abcdefghijklmnopqrstuvwxyz" for i in range(0,14): secret = "".join([abc[(abc.find(c)+i)%26] for c in s]) listA.append(secret) return listA #ROT FUNCTION UPPER def rotu(s): listA = [] abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" for i in range(0,14): secret = "".join([abc[(abc.find(c)+i)%26] for c in s]) listA.append(secret) return listA #ROT FUNCTION UPPER def rot47(s): listA = [] for k in range(1,95): decode = [] for i in range(len(s)): encoded = ord(s[i]) if encoded >= 33 and encoded <= 126: decode.append(chr(33 + ((encoded + 14) % k))) else: decode.append(s[i]) listA.append(''.join(decode)) return listA while checkquit: print("------------------") print("List of ROT: ") print("------------------") print("\n\t [0] -Quit-") print("\t [1] ROT(1-13) #only lowercase") print("\t [2] ROT(1-13) #only uppercase") print("\t [3] ROT(47) ") ans = int(input("\nEnter : ")) if ans == 0: checkquit = False elif ans == 1: cipher = input("Enter cipher : ") listRot = rotl(cipher) for i in listRot: print(f"[+] {i}") elif ans == 2 : cipher = input("Enter cipher : ") listRot = rotu(cipher) for i in listRot: print(f"[+] {i}") elif ans == 3: cipher = input("Enter cipher : ") listRot = rot47(cipher) for i in listRot: print(f"[+] {i}")