Burp Suite User Forum

Login to post

getProxyInterceptionEnabled() ?

fo0 | Last updated: Sep 21, 2020 09:26PM UTC

Hello, For an extension I'm developing, I'd like to have the getter counterpart of setProxyInterceptionEnabled(), that would return either the proxy is enabled or not. I'm not able to find it anywhere, neither another way to get this value. Does someone know if this is possible, and how? Many thanks!

Hannah, PortSwigger Agent | Last updated: Sep 22, 2020 01:15PM UTC

Hi. It doesn't seem like there is a way to tell if master interception is enabled or disabled. However, you might be able to use the presence of an IInterceptedProxyMessage to determine if it is enabled. In addition, IInterceptedProxyMessage has a getInterceptAction() function that may be helpful. You could use IBurpExtenderCallbacks.saveConfigAsJson() in order to get the project options for the installation - in there you can find the contents of the "Proxy > Options" tab. Whilst it won't tell you whether master interception is on or off, you can see the other settings they have enabled. Are you able to provide some more details about your use case?

fo0 | Last updated: Sep 23, 2020 09:07PM UTC

Thank you very much for your answer. I actually found a trick that allows me to tell either the proxy was enabled or disabled when calling setProxyInterceptionEnabled(): the time it takes to execute the function is not the same. I'm working on a head-up display to be able to toggle the proxy with a global keyboard shortcut, along with a status indicator. Code and explanations can be found here: https://github.com/romainricard/burp-headup

Hannah, PortSwigger Agent | Last updated: Sep 24, 2020 07:18AM UTC

That's an interesting functionality! You can set a hotkey for toggling Proxy interception under "User options > Misc > Hotkeys". By default, it is set to "Ctrl + T" - although it looks like you're implementing this functionality for when the Burp window is not the focus as well.

fo0 | Last updated: Sep 24, 2020 07:39AM UTC

Yes, being able to toggle the proxy without leaving the web browser window is a relief. And the indicator is nice to have too, that's why I didn't go for a simple xdotool-based script.

Hannah, PortSwigger Agent | Last updated: Sep 24, 2020 11:22AM UTC

If there's anything else we can help with then please let us know :)

You need to Log in to post a reply. Or register here, for free.