forked from PortSwigger/bambdas
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request PortSwigger#78 from GangGreenTemperTatum/ads/creat…
…ebambaforlast48hrs feat: highlight the past 48 hrs bambdaaaa
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |