Skip to content

Commit

Permalink
Added Extender to tool list and fixed all-tools implemenation
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Strei committed Feb 1, 2022
1 parent a322a5e commit a548bfe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
Binary file removed out/artifacts/Burp_Extractor_jar/Burp_Extractor.jar
Binary file not shown.
Binary file not shown.
10 changes: 9 additions & 1 deletion src/burp/ExtractorEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ private void addButtons(JPanel pane) {
ToolMenuItem repeater = new ToolMenuItem("Repeater", true);
toolSelectors.put(IBurpExtenderCallbacks.TOOL_REPEATER, repeater);
toolSelection.add(repeater);
ToolMenuItem extender = new ToolMenuItem("Extender", true);
toolSelectors.put(IBurpExtenderCallbacks.TOOL_EXTENDER, extender);
toolSelection.add(extender);
toolSelectionBar.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
Expand Down Expand Up @@ -394,6 +397,9 @@ private String escapeRegex(String regex) {
}

public boolean isToolSelected(int toolFlag) {
if (this.allTools.isSelected()) {
return true;
}
return toolSelectors.containsKey(toolFlag) && toolSelectors.get(toolFlag).isSelected();
}

Expand Down Expand Up @@ -436,7 +442,8 @@ public RequestResponseState getEditorState() {
this.isToolSelected(IBurpExtenderCallbacks.TOOL_PROXY),
this.isToolSelected(IBurpExtenderCallbacks.TOOL_SCANNER),
this.isToolSelected(IBurpExtenderCallbacks.TOOL_INTRUDER),
this.isToolSelected(IBurpExtenderCallbacks.TOOL_REPEATER));
this.isToolSelected(IBurpExtenderCallbacks.TOOL_REPEATER),
this.isToolSelected(IBurpExtenderCallbacks.TOOL_EXTENDER));
String[] requestSelectionRegex = this.getSelectionRegex();
RequestResponseState state = new RequestResponseState(tools,
this.useSuiteScope(),
Expand All @@ -454,6 +461,7 @@ public void setEditorState(RequestResponseState state) {
this.toolSelectors.get(IBurpExtenderCallbacks.TOOL_SCANNER).setSelected(state.inScopeTools.scanner);
this.toolSelectors.get(IBurpExtenderCallbacks.TOOL_INTRUDER).setSelected(state.inScopeTools.intruder);
this.toolSelectors.get(IBurpExtenderCallbacks.TOOL_REPEATER).setSelected(state.inScopeTools.repeater);
this.toolSelectors.get(IBurpExtenderCallbacks.TOOL_EXTENDER).setSelected(state.inScopeTools.extender);
this.useScope.setSelected(state.useSuiteScope);
this.useCustomHost.setSelected(!state.useSuiteScope);
this.targetHost.setText(state.targetHost);
Expand Down
5 changes: 4 additions & 1 deletion src/burp/persistence/InScopeTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ public class InScopeTools {
public boolean scanner;
public boolean intruder;
public boolean repeater;
public boolean extender;

public InScopeTools(boolean allTools,
boolean proxy,
boolean scanner,
boolean intruder,
boolean repeater) {
boolean repeater,
boolean extender) {
this.allTools = allTools;
this.proxy = proxy;
this.scanner = scanner;
this.intruder = intruder;
this.repeater = repeater;
this.extender = extender;
}
}

0 comments on commit a548bfe

Please sign in to comment.