Burp Suite User Forum

Create new post

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

Thanks for the quick and detailed reply, that codebase is awesome!

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.