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 branch 'PortSwigger:main' into main
- Loading branch information
Showing
2 changed files
with
26 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,9 @@ | ||
/** | ||
* Bambda Script to Detect "403 Forbidden" in HTTP Response | ||
* @author ctflearner | ||
* This script identifies if the HTTP response status code is 403 (Forbidden). | ||
* It ensures there is a response and checks if the status code indicates access is denied. | ||
**/ | ||
|
||
|
||
return requestResponse.hasResponse() && requestResponse.response().statusCode() == 403; |
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,17 @@ | ||
/** | ||
* Bambda Script to Detect "Safe or Typical HTTP Methods in Requests" | ||
* @author ctflearner | ||
* This script identifies HTTP requests that use typical or safe methods such as GET and POST, | ||
* excluding less common or potentially unsafe methods like PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE, and CONNECT. | ||
* It ensures that the HTTP method is not one of the excluded methods listed. | ||
**/ | ||
|
||
|
||
|
||
return !requestResponse.request().method().equals("PUT") && | ||
!requestResponse.request().method().equals("PATCH") && | ||
!requestResponse.request().method().equals("DELETE") && | ||
!requestResponse.request().method().equals("HEAD") && | ||
!requestResponse.request().method().equals("OPTIONS") && | ||
!requestResponse.request().method().equals("TRACE") && | ||
!requestResponse.request().method().equals("CONNECT"); |