Skip to content

Instantly share code, notes, and snippets.

@singulared
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save singulared/d4f330277af754fca154 to your computer and use it in GitHub Desktop.
Save singulared/d4f330277af754fca154 to your computer and use it in GitHub Desktop.
psif
from telnetlib import Telnet
from caesarcipher import CaesarCipher
tn = Telnet('54.209.5.48', 12345)
tn.read_until(b'psifer text: ')
psifer = tn.read_until(b'\n').decode().strip()
cipher = CaesarCipher(psifer)
message = cipher.cracked
print('Cracked:', message)
tn.write(message.split()[-1].encode() + b'\n')
print(tn.read_all().decode())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment