From 7dc32895c3cf490bcd6e0819b08b5a16a9de52e8 Mon Sep 17 00:00:00 2001 From: Nick Coblentz Date: Fri, 19 Jan 2024 10:27:45 -0600 Subject: [PATCH 1/2] Bambda that displays requests/responses between, before, or after a certain date/time --- Proxy/HTTP/ShowRequestsBetweenDates.bambda | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Proxy/HTTP/ShowRequestsBetweenDates.bambda diff --git a/Proxy/HTTP/ShowRequestsBetweenDates.bambda b/Proxy/HTTP/ShowRequestsBetweenDates.bambda new file mode 100644 index 0000000..49e643c --- /dev/null +++ b/Proxy/HTTP/ShowRequestsBetweenDates.bambda @@ -0,0 +1,28 @@ +/** + * Shows Requests/Responses before, after, or between specified dates + * + * @author Nick Coblentz (https://github.com/ncoblentz) + * + **/ + +//The current configuration looks for requests/responses between January 19th, 2024 10:00AM US Central Time and January 19th, 2024 10:10AM US Central Time +//Change the date/time to the values you desire and your local timezone (https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html#SHORT_IDS) +//Note: System Default zone did not work for me. Maybe it will for you. +//The script accounts for 'null' values. Replace the before or after variables with null to search just before or just after a certain date/time. + +ZonedDateTime requestsAfterThisDate = ZonedDateTime.of(LocalDateTime.of(2024, 1, 19, 10, 0), ZoneId.of("America/Chicago")); // or null +ZonedDateTime requestsBeforeThisDate = ZonedDateTime.of(LocalDateTime.of(2024, 1, 19, 10, 10), ZoneId.of("America/Chicago")); // or null + +boolean afterCheck=true; +boolean beforeCheck=true; + +if(requestsAfterThisDate!=null) +{ + afterCheck = requestResponse.time().isAfter(requestsAfterThisDate); +} +if(requestsBeforeThisDate!=null) +{ + beforeCheck = requestResponse.time().isBefore(requestsBeforeThisDate); +} + +return afterCheck&&beforeCheck; \ No newline at end of file From bb75372171f128cfee2611f278d3bf0b6f65ced8 Mon Sep 17 00:00:00 2001 From: PortSwiggerWiener <136816696+PortSwiggerWiener@users.noreply.github.com> Date: Mon, 22 Jan 2024 09:15:15 +0000 Subject: [PATCH 2/2] Update ShowRequestsBetweenDates.bambda --- Proxy/HTTP/ShowRequestsBetweenDates.bambda | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Proxy/HTTP/ShowRequestsBetweenDates.bambda b/Proxy/HTTP/ShowRequestsBetweenDates.bambda index 49e643c..ebde984 100644 --- a/Proxy/HTTP/ShowRequestsBetweenDates.bambda +++ b/Proxy/HTTP/ShowRequestsBetweenDates.bambda @@ -7,22 +7,22 @@ //The current configuration looks for requests/responses between January 19th, 2024 10:00AM US Central Time and January 19th, 2024 10:10AM US Central Time //Change the date/time to the values you desire and your local timezone (https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html#SHORT_IDS) -//Note: System Default zone did not work for me. Maybe it will for you. //The script accounts for 'null' values. Replace the before or after variables with null to search just before or just after a certain date/time. ZonedDateTime requestsAfterThisDate = ZonedDateTime.of(LocalDateTime.of(2024, 1, 19, 10, 0), ZoneId.of("America/Chicago")); // or null ZonedDateTime requestsBeforeThisDate = ZonedDateTime.of(LocalDateTime.of(2024, 1, 19, 10, 10), ZoneId.of("America/Chicago")); // or null -boolean afterCheck=true; -boolean beforeCheck=true; +boolean afterCheck = true; +boolean beforeCheck = true; -if(requestsAfterThisDate!=null) +if (requestsAfterThisDate != null) { afterCheck = requestResponse.time().isAfter(requestsAfterThisDate); } -if(requestsBeforeThisDate!=null) + +if (requestsBeforeThisDate != null) { beforeCheck = requestResponse.time().isBefore(requestsBeforeThisDate); } -return afterCheck&&beforeCheck; \ No newline at end of file +return afterCheck && beforeCheck;