diff --git a/Filter/Proxy/HTTP/HighlightPast48hrs.bambda b/Filter/Proxy/HTTP/HighlightPast48hrs.bambda new file mode 100644 index 0000000..c606313 --- /dev/null +++ b/Filter/Proxy/HTTP/HighlightPast48hrs.bambda @@ -0,0 +1,20 @@ +/** + * 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