Created
          June 5, 2020 10:36 
        
      - 
      
- 
        Save AdaniKamal/6a0bba50dc1d251caa25b10c578142c9 to your computer and use it in GitHub Desktop. 
  
    
      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 characters
    
  
  
    
  | #!/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}") | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment