Burp Suite User Forum

Create new post

exitSuite

Samuel | Last updated: Feb 25, 2015 06:34PM UTC

Can someone provide some example code for stopping burp suite programmatically using exitSuite as a Burp extension?

PortSwigger Agent | Last updated: Feb 26, 2015 08:40AM UTC

In your main BurpExtender class, you will be passed an IBurpExtenderCallbacks object when registerExtenderCallbacks() is called. You can exit the suite by calling: callbacks.exitSuite(true); Passing true will prompt the user to confirm the shutdown; passing false will not. Your code will need to hold a reference somewhere to the callbacks object, so that you can call into it later.

Burp User | Last updated: Feb 26, 2015 06:04PM UTC

Thanks, I figured that part out but I'm trying to basically do this: ant fires up an instance of BurpProxy by making a java -jar invocation some automated tests run from the test framework, I want to shutdown BurpProxy. Calling the exitSuite method from outside of the invocation results in an NPE because it has no reference to the callback object. Is there a way to register it somehow so I can get access to it?

PortSwigger Agent | Last updated: Feb 27, 2015 08:58AM UTC

When Burp calls registerExtenderCallbacks() it will pass your extension a reference to the callbacks object. Your code will need to hold a reference somewhere to the callbacks object, so that you can call into it later. For example, you could store the reference in a field in your main extension class and retrieve it from there.

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