Bisix

alay_decryptor

Nov 28th, 2020 (edited)
817
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # AKA leet decoder
  2. # USAGE:
  3. # python3 -c "$(curl -s 'https://pastebin.com/raw/7KXZcbgT')" '4554L4111U4L41KU111 P354N 1N1 11131118UK71K4N 841-1W4 074K K174 ...'
  4.  
  5. import sys
  6.  
  7. metaru=[['111', 'M'], ['1-1', 'H'], ['12', 'R'], ['7', 'T'], ['5', 'S'], ['0', 'O'], ['1', 'I'], ['6', 'G'], ['3', 'E'], ['8', 'B'], ['4', 'A']]
  8.  
  9. cipher=sys.argv[1]
  10. plain=''
  11.  
  12. while len(cipher):
  13.     C=0
  14.  
  15.     for riaru,feiku in metaru:
  16.         if cipher.startswith(riaru):
  17.             Bx,Mx,C=feiku,len(riaru),1
  18.             break
  19.    
  20.     plain+=Bx if C else cipher[0]
  21.     cipher=cipher[Mx if C else 1:]
  22.  
  23. print(plain)
RAW Paste Data