Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import sys
  2. charset = 'abcdefghijklmnopqrstuvwxyz'
  3.  
  4. def decrypt(cipher):
  5. k = 0
  6. while ( k != 26 ):
  7. result = ''
  8. for i in range(len(cipher)):
  9. if cipher[i] in charset:
  10. vitri = charset.index(cipher[i])
  11. result+= charset[(vitri + k) % 26]
  12. else:
  13. result+= cipher[i]
  14. print result
  15. k+=1
  16.  
  17. decrypt(sys.argv[1].lower())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement