Skip to content

Commit

Permalink
Fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
righettod committed Oct 7, 2018
1 parent b750c67 commit cc15f40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'java'

group 'eu.righettod'
version '1.0.2'
version '1.0.3'
def burpExtensionHomepage = 'https://github.com/righettod/log-requests-to-sqlite'
def burpExtensionJarName = 'LogRequestsToSQLite.jar'

Expand Down
7 changes: 6 additions & 1 deletion src/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ public class BurpExtender implements IBurpExtender {
* {@inheritDoc}
*/
public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
ConfigMenu configMenu = null;
try {
String extensionName = "LogRequestsToSQLite";
callbacks.setExtensionName(extensionName);
Trace trace = new Trace(callbacks);
ConfigMenu configMenu = new ConfigMenu(callbacks, trace);
configMenu = new ConfigMenu(callbacks, trace);
SwingUtilities.invokeLater(configMenu);
String storeFileName = new File(System.getProperty("user.home"), extensionName + ".db").getAbsolutePath().replaceAll("\\\\", "/");
ActivityLogger activityLogger = new ActivityLogger(storeFileName, callbacks, trace);
Expand All @@ -26,6 +27,10 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
callbacks.registerExtensionStateListener(configMenu);
} catch (Exception e) {
callbacks.issueAlert("Cannot start the extension: " + e.getMessage());
//Unload the menu if the extension cannot be loaded
if (configMenu != null) {
configMenu.extensionUnloaded();
}
}
}
}

0 comments on commit cc15f40

Please sign in to comment.