Burp Suite User Forum

[Extender API] How do I append configuration to the project file?

hazcod | Last updated: Mar 23, 2020 07:03PM UTC

Hi, I am using the Java API where the following are interesting: void saveExtensionSetting(String name, String value); String saveConfigAsJson(String... configPaths); However it seems that none of those save anything to the project-level settings?

Hannah, PortSwigger Agent | Last updated: Mar 24, 2020 09:06AM UTC

saveExtensionSetting() allows you to save extension-specific settings, to allow you to retrieve them with loadExtensionSetting(). saveConfigAsJson(), with no arguments, should return your entire project-level configuration as a string. If you want to make alterations to the project-level configuration, you should use loadConfigFromJson(String config). You can find more information on this function in the documentation (IBurpExtenderCallbacks.loadConfigFromJson()): https://portswigger.net/burp/extender/api/

hazcod | Last updated: Mar 24, 2020 09:48AM UTC

Hello Hannah, Is it possible to have extension-specific configuration settings saved along in the Burp project files? Additionally, is this where the HTTP proxy logs are stored too? In my case, I need extension-specific data + all proxy HTTP logs stored in one file that should exist within one project.

Hannah, PortSwigger Agent | Last updated: Mar 24, 2020 10:02AM UTC

If you are using a disk-based project file, your HTTP history is stored as part of that and will be accessible by normal API calls, like IBurpExtenderCallbacks.getProxyHistory(). If you are using a temporary project file or using Burp Suite Community Edition, then the logs will not be persisted. It sounds like you want to use saveExtensionSetting() and retrieve your extension settings with loadExtensionSetting().

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