Skip to content

Commit

Permalink
データベースのリセット方法を追記
Browse files Browse the repository at this point in the history
  • Loading branch information
ankokuty committed Oct 7, 2017
1 parent 0d66145 commit f76f909
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 17 additions & 1 deletion src/main/java/badstore/StartBadStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,25 @@

public class StartBadStore {
public static void main(String[] args) throws Exception {
String host = "127.0.0.1";
int port = 8528;

Class.forName("org.sqlite.JDBC");
BadStore badstore = new BadStore(8528, "127.0.0.1", null);

try {
if (args[0] != null) {
host = args[0];
}
} catch (ArrayIndexOutOfBoundsException ignore) {
}

try {
port = Integer.valueOf(args[1]);
} catch (ArrayIndexOutOfBoundsException ignore) {
} catch (NumberFormatException ignore) {
}

BadStore badstore = new BadStore(port, host, null);
badstore.startServer(null);
}
}
4 changes: 2 additions & 2 deletions src/main/java/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
callbacks.addSuiteTab(BurpExtender.this);
});

callbacks.printOutput("Hakoniwa BadStore is using " + BadStore.storeDir.getAbsolutePath() + " as a temporary directory.");
callbacks.printOutput("If something goes wrong, delete this directory and restart the BadStore server.");
callbacks.printOutput("When something goes wrong, access /cgi-bin/initdbs.cgi to reset the database.");
callbacks.printOutput("Or delete temporary directory (" + BadStore.storeDir.getAbsolutePath() + ") and restart the Hakoniwa BadStore server.");
}

@Override
Expand Down

0 comments on commit f76f909

Please sign in to comment.