Burp Suite User Forum

Login to post

Obtain the list of enabled URLs in the included target scope

Yaroslav | Last updated: May 17, 2020 01:09PM UTC

Hi, I would like to output in the extension tab currently enabled target scope. As I've already found there are registerScopeChangeListener(), getScopeChangeListeners(), getScopeChangeListeners(), isInScope(URL), includeInScope(URL), excludeFromScope(URL) methods and none of them provides enabled URLs in target scope. Please advice if it is possible to get target scope using burp API? Many thanks

Hannah, PortSwigger Agent | Last updated: May 18, 2020 10:13AM UTC

If you use IBurpExtenderCallbacks.saveConfigAsJson(), it will export your project options configuration. At the bottom of the project options JSON file, there should be a section for Scope, with your included and excluded URLs. You could use this to get the target scope using the Extender API, if the other options do not work for you?

Yaroslav | Last updated: May 19, 2020 11:45AM UTC

Hello Hannah, `callbacks.saveConfigAsJson("target.scope")` works for me, thanks. For others who will face with the same issue: above method gives the JSON string of actual scope. Also, there is `callbacks.registerScopeChangeListener()` to listen for the changes happen in scope. It seems that using this API I would reach always actual target.scope Thanks

Hannah, PortSwigger Agent | Last updated: May 20, 2020 07:25AM UTC

Hi, I'm glad that worked for you. Please let us know if you need any further assistance.

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