Last active
February 24, 2017 21:42
-
-
Save dionyziz/5bf3857f2687a357536d44724b8a8879 to your computer and use it in GitHub Desktop.
This file contains 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
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