Support Center

Burp Community

See what our users are saying about Burp Suite:

How do I?

New Post View All

Feature Requests

New Post View All

Burp Extensions

New Post View All

Bug Reports

New Post View All
Documentation

Burp Suite Documentation

Take a look at our Documentation section for full details about every Burp Suite tool, function and configuration option.

Full Documentation Contents Burp Projects
Suite Functions Burp Tools
Options Using Burp Suite
Extensibility

Burp Extender

Burp Extender lets you extend the functionality of Burp Suite in numerous ways.

Extensions can be written in Java, Python or Ruby.

API documentation Writing your first Burp Suite extension
Sample extensions View community discussions about Extensibility
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Get local path of burp file via API

Wyatt Dahlenburg Dec 10, 2018 03:41PM UTC

I'm looking to be able to save information to the same directory as my Burp project file through a Burp Extension.

I organize my project files in folders with respect to the applications I'm testing.

There is the getCommandLineArguments method from callbacks, however I don't run Burp through the command line. I'd be fine doing this, but I'm not sure if I can load a project file this way.

In an extension, I can use os.getpwd() in python to get the working directory of the extension. I don't generally keep my extensions in my project folders. I don't want to place an extension in every project directory.

My need is for this to be dynamic. An API call would be preferred.

I wasn't able to find an API call that met this need. Do other people write to files in their project directory?


Paul Johnston Dec 11, 2018 10:52AM UTC Support Center agent

There isn’t currently an API to do this, although it’s something we may add in future.

You can load a project from the command like, using the —project-file switch.

What some extensions do as a workaround is use addToSiteMap to add a page to the site map. This isn’t a real page, rather something like http://extension-info/ This lets extensions save data inside the project file. For example, Response Clusterer was recently updated to have this functionality.


Wyatt Dahlenburg Dec 11, 2018 02:24PM UTC
I gave the project-file switch a try and did not get any results.

I ran the jar like this:

java -jar C:\path_to_jar\burpsuite.jar --project-file=C:\different_path_to_project\my_project.burp

In the registerExtenderCallbacks method I have the following python code to look at the arguments:

print "Arguments are"
for i in callbacks.getCommandLineArguments():
print i
print "Len of args is %d" % len(callbacks.getCommandLineArguments())

In the output I get:

Arguments are
Len of args is 0

Wyatt Dahlenburg Dec 11, 2018 02:30PM UTC
I'm not looking to save data to the project file. My goal is to be able to export data to be consumed by other tools.

I suppose a temporary solution would be to add a settings configuration and manually add the path each time. Then I could run my functionality based on this setting.

Paul Johnston Dec 11, 2018 05:26PM UTC Support Center agent

Ok, getCommandLineArguments() returns the arguments after the Burp arguments have been parsed, so it won’t help here.

I think that temporary solution is the best for now. We are going to do a refactor of the Extender API in future. We’ll let you know when we’ve added this feature.


Post Your public answer

Your name
Your email address
Answer