Skip to content

Commit

Permalink
Fixed #16: added random user agent checkbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
JGillam committed Dec 9, 2016
1 parent 23991c5 commit 2f7192e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1306,19 +1306,14 @@
</grid>
</children>
</grid>
<grid id="16c81" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="16c81" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<tabbedpane title="Headers"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<hspacer id="73b13">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<scrollpane id="ed195">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
Expand All @@ -1334,6 +1329,34 @@
</component>
</children>
</scrollpane>
<grid id="916ff" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="dd56a" class="javax.swing.JCheckBox" binding="chkRandomUserAgent">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Use Random User Agent"/>
</properties>
</component>
<vspacer id="a89b1">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
</children>
</grid>
<hspacer id="490ca">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
</children>
</grid>
</children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public class SQLMapperForm implements ClipboardOwner, ActionListener, DocumentLi
private JTextField txtOS;
private JTextField txtExtra;
private JTextArea textExtraHeaders;
private JCheckBox chkRandomUserAgent;
private Map<JCheckBox, String> enumCheckboxes = new HashMap<JCheckBox, String>();
private Map<JCheckBox, String> techniqueCheckboxes = new HashMap<JCheckBox, String>();
private Map<JCheckBox, String> generalMiscCheckboxes = new HashMap<JCheckBox, String>();
Expand Down Expand Up @@ -182,6 +183,7 @@ private void showPopup(MouseEvent e) {

// Add listeners for Request / Headers tab
textExtraHeaders.getDocument().addDocumentListener(this);
enumCheckboxes.put(chkRandomUserAgent, "--random-agent"); // yes, this isn't an enum checkbox, but it is convenient for now.

// Add listeners for Detection tab
cmboDetectionRisk.addActionListener(this);
Expand Down

0 comments on commit 2f7192e

Please sign in to comment.