From 94fcd2334b902ee4fb8882cb4571e29bc0be222f Mon Sep 17 00:00:00 2001 From: GangGreenTemperTatum <104169244+GangGreenTemperTatum@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:26:10 -0400 Subject: [PATCH 1/2] feat: highlight the past 48 hrs bambdaaaa --- Filter/Proxy/HTTP/HighlightPast48hrs.bambda | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Filter/Proxy/HTTP/HighlightPast48hrs.bambda diff --git a/Filter/Proxy/HTTP/HighlightPast48hrs.bambda b/Filter/Proxy/HTTP/HighlightPast48hrs.bambda new file mode 100644 index 0000000..4d034b9 --- /dev/null +++ b/Filter/Proxy/HTTP/HighlightPast48hrs.bambda @@ -0,0 +1,21 @@ +/** + * Filter the past 48 hours worth of in-scope proxy history + * + * @author GangGreenTemperTatum (https://github.com/GangGreenTemperTatum) + **/ + + boolean configInScopeOnly = true; // Flag to filter only in-scope items + + // Get current time and calculate 48 hours ago + ZonedDateTime now = ZonedDateTime.now(); + ZonedDateTime fortyEightHoursAgo = now.minusHours(48); + + // Check if the request time is within the last 48 hours + boolean afterCheck = requestResponse.time().isAfter(fortyEightHoursAgo); + + // Check if the request is in scope + boolean inScopeCheck = !configInScopeOnly || requestResponse.request().isInScope(); + + // Return true only if both conditions are met + return afterCheck && inScopeCheck; + \ No newline at end of file From e0cf4f9031ba17b545776d4daee0c503ff3cf574 Mon Sep 17 00:00:00 2001 From: GangGreenTemperTatum <104169244+GangGreenTemperTatum@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:30:41 -0400 Subject: [PATCH 2/2] chore: rm appended cr --- Filter/Proxy/HTTP/HighlightPast48hrs.bambda | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Filter/Proxy/HTTP/HighlightPast48hrs.bambda b/Filter/Proxy/HTTP/HighlightPast48hrs.bambda index 4d034b9..c606313 100644 --- a/Filter/Proxy/HTTP/HighlightPast48hrs.bambda +++ b/Filter/Proxy/HTTP/HighlightPast48hrs.bambda @@ -17,5 +17,4 @@ boolean inScopeCheck = !configInScopeOnly || requestResponse.request().isInScope(); // Return true only if both conditions are met - return afterCheck && inScopeCheck; - \ No newline at end of file + return afterCheck && inScopeCheck; \ No newline at end of file