Skip to content

Commit

Permalink
Added fix for latest burp breaking response searching
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerbarnes committed Oct 20, 2023
1 parent 78f2ad8 commit 41f1031
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>18</source>
<target>18</target>
</configuration>
</plugin>

Expand Down
42 changes: 26 additions & 16 deletions src/main/java/com/staticflow/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,32 @@ private static void searchRepeaterTabsForString(String search) {
JTabbedPane repeaterTabs = ExtensionState.getInstance().getRepeaterTabbedPane();
ExtensionState.getInstance().getCallbacks().logging().logToOutput("Searching for: "+search);
for( int i=0; i < repeaterTabs.getTabCount(); i++) {
repeaterTabs.setBackgroundAt(i,new Color(0xBBBBBB));
List<Component> repeaterTabRequestResponseJTextAreas = BurpGuiControl.findAllComponentsOfType((Container) repeaterTabs.getComponentAt(i), JTextArea.class);

if ( searchRequestForText ) {
JTextArea requestTextArea = (JTextArea) repeaterTabRequestResponseJTextAreas.get(0);
ExtensionState.getInstance().getCallbacks().logging().logToOutput(requestTextArea.getText());
if (searchTextArea(search,requestTextArea) ) {
repeaterTabs.setBackgroundAt(i,new Color(0xff6633));
}
}
if ( searchResponseForText ) {
JTextArea responseTextArea = (JTextArea) repeaterTabRequestResponseJTextAreas.get(1);
ExtensionState.getInstance().getCallbacks().logging().logToOutput(responseTextArea.getText());
if (searchTextArea(search, responseTextArea)) {
repeaterTabs.setBackgroundAt(i,new Color(0xff6633));
}
if (repeaterTabs.getComponentAt(i) != null) {
repeaterTabs.setBackgroundAt(i, new Color(0xBBBBBB));
List<Component> repeaterTabRequestResponseJTextAreas = BurpGuiControl.findAllComponentsOfType((Container) repeaterTabs.getComponentAt(i), JTextArea.class);
ExtensionState.getInstance().getCallbacks().logging().logToOutput("jtextarea count: "+repeaterTabRequestResponseJTextAreas.size());
if (searchRequestForText) {
JTextArea requestTextArea = (JTextArea) repeaterTabRequestResponseJTextAreas.get(0);
if (searchTextArea(search, requestTextArea)) {
ExtensionState.getInstance().getCallbacks().logging().logToOutput(requestTextArea.getText());
repeaterTabs.setBackgroundAt(i, new Color(0xff6633));
}
}
if (searchResponseForText) {
for(int x = 1; x <repeaterTabRequestResponseJTextAreas.size();x++){
if(((JTextArea)repeaterTabRequestResponseJTextAreas.get(x)).getText().length() != 0) {
ExtensionState.getInstance().getCallbacks().logging().logToOutput("searching response");
JTextArea responseTextArea = (JTextArea) repeaterTabRequestResponseJTextAreas.get(1);
ExtensionState.getInstance().getCallbacks().logging().logToOutput(responseTextArea.getText());
if (searchTextArea(search, responseTextArea)) {
ExtensionState.getInstance().getCallbacks().logging().logToOutput("found in response");
ExtensionState.getInstance().getCallbacks().logging().logToOutput(responseTextArea.getText());
repeaterTabs.setBackgroundAt(i, new Color(0xff6633));
}
break;
}
}
}
}
}
}
Expand Down
Binary file modified target/RepeaterSearch.jar
Binary file not shown.

0 comments on commit 41f1031

Please sign in to comment.