Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
Proxy tool added to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
miroc committed Nov 28, 2016
1 parent 2700546 commit d2d61e9
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

public class BurpExtender implements IBurpExtender, IHttpListener, IContextMenuFactory, ITab {
private static String EXTENSION_NAME = "ExtendedMacro";
private static String VERSION = "v0.0.1-alpha";
private static String VERSION = "v0.0.2";
public PrintWriter stdout;
public PrintWriter stderr;
public IExtensionHelpers helpers;
Expand Down Expand Up @@ -56,6 +56,7 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IContextMenuF
private JCheckBox scanner;
private JCheckBox sequencer;
private JCheckBox spider;
private JCheckBox proxy;

@Override
public void registerExtenderCallbacks(IBurpExtenderCallbacks iBurpExtenderCallbacks) {
Expand All @@ -82,6 +83,15 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks iBurpExtenderCallba
stdout.println("[*] " + EXTENSION_NAME + " " + VERSION);
}

public boolean isEnabledAtLeastOne() {
return intruder.isSelected() ||
repeater.isSelected() ||
scanner.isSelected() ||
sequencer.isSelected() ||
proxy.isSelected() ||
spider.isSelected();
}

public String getNextMsgId() {
return String.valueOf(++msgId);
}
Expand Down Expand Up @@ -367,13 +377,15 @@ private void initGui() {
scanner = new JCheckBox("Scanner");
sequencer = new JCheckBox("Sequencer");
spider = new JCheckBox("Spider");
proxy = new JCheckBox("Proxy")
JButton enDisTool = new JButton("All/None");

repeater.setSelected(true);
intruder.setSelected(true);
scanner.setSelected(true);
sequencer.setSelected(true);
spider.setSelected(true);
proxy.setSelected(false);

enDisTool.addActionListener(new ConfigListener(this, ConfigActions.A_ENABLE_DISABLE));

Expand All @@ -384,24 +396,18 @@ private void initGui() {
confPanel.add(scanner);
confPanel.add(sequencer);
confPanel.add(spider);
confPanel.add(proxy);

mainTabPane.addTab("Settings", confPanel);
}

public boolean isEnabledAtLeatOne() {
return intruder.isSelected() ||
repeater.isSelected() ||
scanner.isSelected() ||
sequencer.isSelected() ||
spider.isSelected();
}

public void setAllTools(boolean enabled) {
repeater.setSelected(enabled);
intruder.setSelected(enabled);
scanner.setSelected(enabled);
sequencer.setSelected(enabled);
spider.setSelected(enabled);
proxy.setSelected(enabled);
}


Expand All @@ -421,6 +427,9 @@ public boolean isToolEnabled(int toolFlag) {

case IBurpExtenderCallbacks.TOOL_SPIDER:
return spider.isSelected();

case IBurpExtenderCallbacks.TOOL_PROXY:
return proxy.isSelected();
}
return false;
}
Expand Down

0 comments on commit d2d61e9

Please sign in to comment.