-
-
Save ahembree/aabc39912be1ccd0a7d3af96411db99f to your computer and use it in GitHub Desktop.
Example_jython_burp_extension
This file contains hidden or 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
| # Just color requests hitting different ports on Burp so we can easily identify which user session is which. | |
| from burp import IBurpExtender | |
| from burp import IProxyListener | |
| import re | |
| class BurpExtender(IBurpExtender, IProxyListener): | |
| # define registerExtenderCallbacks: From IBurpExtender Interface | |
| def registerExtenderCallbacks(self, callbacks): | |
| self._callbacks = callbacks | |
| self._helpers = callbacks.getHelpers() | |
| self._callbacks.setExtensionName("Proxy Coloring") | |
| callbacks.registerProxyListener(self) | |
| return | |
| # IProxyListener.processProxyMessage - color it for message coming through different port. | |
| def processProxyMessage(self, messageIsRequest, message): | |
| colors = ['gray','magenta','red', 'orange', 'blue' , 'green', 'cyan', 'blue', 'pink','gray'] | |
| # Determine the highlighted color base of the last digit of the port number. | |
| message.getMessageInfo().setHighlight(colors[int(message.getListenerInterface().split(':')[1])%10]) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

I think you also need Jython: https://www.jython.org/