-
-
Save p-g-krish/e70e01e2ff648e96738353dbb303164e to your computer and use it in GitHub Desktop.
Burp Extender - Python Scripter Plug-in to send responses to a docker container for further processing ( decryption/encoding/analysis )
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
import sys | |
import re | |
import urllib2 | |
import base64 | |
print(sys.version) | |
print(sys.path) | |
pattern = r"content-type:.application/json" | |
if not messageIsRequest: | |
response = messageInfo.getResponse() | |
foundmatches = re.finditer(pattern, response.tostring(), re.MULTILINE | re.IGNORECASE) | |
if(foundmatches): | |
bodyStart=helpers.analyzeResponse(response).getBodyOffset() | |
print(response.tostring()[bodyStart:]) | |
print("\r\n##end of response##\r\n") | |
url = 'http://127.0.0.1:5000/decode' | |
encoded = base64.b64encode('response.tostring()[bodyStart:]) | |
req = urllib2.Request(url,encoded) | |
post = urllib2.urlopen(req) | |
print(post.read()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment