Skip to content

Commit

Permalink
Merge branch 'PortSwigger:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
intrudir authored Dec 23, 2024
2 parents 12dd90d + 5a13580 commit bb67019
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Filter/Proxy/HTTP/Detect403Forbidden.bambda
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;
17 changes: 17 additions & 0 deletions Filter/Proxy/HTTP/DetectSafeHttpMethods.bambda
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");

0 comments on commit bb67019

Please sign in to comment.