The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

Scope manipulation API

Veres-Szentkirályi | Last updated: Jan 22, 2019 08:45AM UTC

Methods IBurpExtenderCallbacks.{includeIn,excludeFrom}Scope make it possible to add/remove a specific URL to/from the scope. Is there a way to use these or any other API call to perform actions like those available on the GUI, such as specifying regular expressions for the path, ignoring the protocol and/or port, etc.?

PortSwigger Agent | Last updated: Jan 22, 2019 09:23AM UTC

You can use loadConfigFromJson() to configure an advanced scope. What I recommend you do is set up a scope you want in the GUI and use the cog button to save this as JSON. Paste this JSON as a string in your extension source code, and use loadConfigFromJson() to apply it. When you've got that working, you can try changing the JSON string within the code to set a dynamic scope. If you want to do more advanced things with loadConfigFromJson, there's some interesting code here: - https://github.com/pajswigger/repeater-cookie-switch

Burp User | Last updated: Jan 22, 2019 10:37AM UTC