Keeping in mind that all extensions are developed by taking the PortSwigger-provided structure (which was previously shown) as the code base, the entry point for your extension is as follows:
void registerExtenderCallbacks (IBurpExtenderCallbacks callbacks);
If you want to call your own extension, you will need to use the following method:
callbacks.setExtensionName (Your extension name);
The following code shows the byte utilities. They are useful for managing strings, searching substrings, encoding, decoding, and more:
int indexOf (byte[] data, byte[] pattern, boolean caseSensitive, int from, int to); String bytesToString(byte[] data); byte[] stringToBytes(String data); String urlDecode(String data); String urlEncode(String data); byte[] urlDecode(byte[] data); byte[] urlEncode(byte[] data); byte[] base64Decode(String data); byte[] base64Decode(byte[] data); String base64Encode(String data); String base64Encode(byte[] data);
The following code is used to tell Burp Suite what your extension is managing:
void IBurpExtenderCallbacks.registerExtensionStateListener(IExtensionStateListener listener);
The method to save states is shown in the following code:
void IBurpExtenderCallbacks.saveExtensionSetting(String name, String value); String IBurpExtenderCallbacks.loadExtensionSetting(String name);
Finally, this is the method that you can use to manage files:
ITempFile IBurpExtenderCallbacks.saveToTempFile(byte[] buffer);
byte[] ITempFile.getBuffer();
If you want more details about the Burp Suite API, or even some examples of its use, check the official site at https://portswigger.net/burp/extender#SampleExtensions.