Skip to content

Instantly share code, notes, and snippets.

@dionyziz

dionyziz/get-ciphertext.py

Last active Feb 24, 2017
Embed
What would you like to do?
from monkeypatcher import patch
import socket
import urllib2
def recv_wrapper(bufsize, flags=None):
ciphertext = recv_original(bufsize, flags)
print('Captured ciphertext data: %s' % (ciphertext))
return ciphertext
interceptor, recv_original = patch.intercept((socket, 'recv'))
interceptor.bind(recv_wrapper)
f = urllib2.urlopen('https://ruptureit.com/test2.php?reflection=xxx')
plaintext = f.read()
print('Plaintext data: %s' % plaintext)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment