From adb9dc664f0ce7ba6bc6da3a24e6d9ba6b808310 Mon Sep 17 00:00:00 2001 From: Bug Bounty Zip <133497067+BugBountyzip@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:20:55 +0300 Subject: [PATCH 1/4] Create NotesKeywordHighlighter.bambda NotesKeywordHighlighter.bambda --- Proxy/HTTP/NotesKeywordHighlighter.bambda | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Proxy/HTTP/NotesKeywordHighlighter.bambda diff --git a/Proxy/HTTP/NotesKeywordHighlighter.bambda b/Proxy/HTTP/NotesKeywordHighlighter.bambda new file mode 100644 index 0000000..f69a184 --- /dev/null +++ b/Proxy/HTTP/NotesKeywordHighlighter.bambda @@ -0,0 +1,29 @@ +/** + * Notes Filter Bambda + * This Bambda filters Proxy HTTP history for entries with notes containing a specified keyword. + * It checks for a specific keyword within the notes and highlights the matching entries. + * Users can easily modify the 'keyword' variable to suit their specific search criteria. + * Author: Tur24Tur + * GitHub: @BugBountyzip (https://github.com/BugBountyzip) + **/ + +// User-defined keyword for filtering notes +String keyword = "High"; // Replace "High" with your desired keyword + +// Main logic of the Bambda +if (requestResponse.request().url() != null && requestResponse.hasResponse()) { + // Check if there are any notes for the HTTP request and response + if (requestResponse.annotations().hasNotes()) { + // Retrieve the notes + String notes = requestResponse.annotations().notes(); + + // Check if the notes contain the specified keyword + if (notes.contains(keyword)) { + + requestResponse.annotations().setHighlightColor(HighlightColor.YELLOW); + return true; + } + } +} + +return false; From ac93a0fd75ebdabf25399b45042276a6eab2b3f9 Mon Sep 17 00:00:00 2001 From: Bug Bounty Zip <133497067+BugBountyzip@users.noreply.github.com> Date: Wed, 13 Dec 2023 13:53:32 +0300 Subject: [PATCH 2/4] Update NotesKeywordHighlighter.bambda fixed --- Proxy/HTTP/NotesKeywordHighlighter.bambda | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Proxy/HTTP/NotesKeywordHighlighter.bambda b/Proxy/HTTP/NotesKeywordHighlighter.bambda index f69a184..9c51fb0 100644 --- a/Proxy/HTTP/NotesKeywordHighlighter.bambda +++ b/Proxy/HTTP/NotesKeywordHighlighter.bambda @@ -3,8 +3,7 @@ * This Bambda filters Proxy HTTP history for entries with notes containing a specified keyword. * It checks for a specific keyword within the notes and highlights the matching entries. * Users can easily modify the 'keyword' variable to suit their specific search criteria. - * Author: Tur24Tur - * GitHub: @BugBountyzip (https://github.com/BugBountyzip) + * @author Tur24Tur / BugBountyzip (https://github.com/BugBountyzip) **/ // User-defined keyword for filtering notes From bef4ee1ae229741663bf84eef9a198e13e09b3c9 Mon Sep 17 00:00:00 2001 From: Bug Bounty Zip <133497067+BugBountyzip@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:27:06 +0300 Subject: [PATCH 3/4] Update NotesKeywordHighlighter.bambda done --- Proxy/HTTP/NotesKeywordHighlighter.bambda | 27 +++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Proxy/HTTP/NotesKeywordHighlighter.bambda b/Proxy/HTTP/NotesKeywordHighlighter.bambda index 9c51fb0..11c2cd5 100644 --- a/Proxy/HTTP/NotesKeywordHighlighter.bambda +++ b/Proxy/HTTP/NotesKeywordHighlighter.bambda @@ -8,21 +8,24 @@ // User-defined keyword for filtering notes String keyword = "High"; // Replace "High" with your desired keyword +boolean caseSensitive = true; // Set to true for case-sensitive search false for case-insensitive PortSwiggerWiener <3 -// Main logic of the Bambda -if (requestResponse.request().url() != null && requestResponse.hasResponse()) { - // Check if there are any notes for the HTTP request and response - if (requestResponse.annotations().hasNotes()) { - // Retrieve the notes - String notes = requestResponse.annotations().notes(); +// Check if there's a response and the response has notes +if (requestResponse.hasResponse() && requestResponse.annotations().hasNotes()) { + // Retrieve the notes + String notes = requestResponse.annotations().notes(); - // Check if the notes contain the specified keyword - if (notes.contains(keyword)) { - - requestResponse.annotations().setHighlightColor(HighlightColor.YELLOW); - return true; - } + // Adjust for case sensitivity + String processedNotes = caseSensitive ? notes : notes.toLowerCase(); + String processedKeyword = caseSensitive ? keyword : keyword.toLowerCase(); + + // Check if the notes contain the specified keyword + if (processedNotes.contains(processedKeyword)) { + // If keyword is found, set highlight color and return true + requestResponse.annotations().setHighlightColor(HighlightColor.YELLOW); + return true; } } +// If the keyword is not found or there are no notes, return false return false; From 09a18977cef8c161dbea83a39238984fe842f494 Mon Sep 17 00:00:00 2001 From: ps-porpoise <152162390+ps-porpoise@users.noreply.github.com> Date: Wed, 13 Dec 2023 13:15:41 +0000 Subject: [PATCH 4/4] Update NotesKeywordHighlighter.bambda --- Proxy/HTTP/NotesKeywordHighlighter.bambda | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Proxy/HTTP/NotesKeywordHighlighter.bambda b/Proxy/HTTP/NotesKeywordHighlighter.bambda index 11c2cd5..5b9a4b7 100644 --- a/Proxy/HTTP/NotesKeywordHighlighter.bambda +++ b/Proxy/HTTP/NotesKeywordHighlighter.bambda @@ -1,9 +1,9 @@ /** - * Notes Filter Bambda + * Finds entries with notes containing a specified keyword + * @author Tur24Tur / BugBountyzip (https://github.com/BugBountyzip) * This Bambda filters Proxy HTTP history for entries with notes containing a specified keyword. * It checks for a specific keyword within the notes and highlights the matching entries. * Users can easily modify the 'keyword' variable to suit their specific search criteria. - * @author Tur24Tur / BugBountyzip (https://github.com/BugBountyzip) **/ // User-defined keyword for filtering notes @@ -11,7 +11,7 @@ String keyword = "High"; // Replace "High" with your desired keyword boolean caseSensitive = true; // Set to true for case-sensitive search false for case-insensitive PortSwiggerWiener <3 // Check if there's a response and the response has notes -if (requestResponse.hasResponse() && requestResponse.annotations().hasNotes()) { +if (requestResponse.annotations().hasNotes()) { // Retrieve the notes String notes = requestResponse.annotations().notes();