Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Detect101SwitchingProtocols.bambda #62

Merged
merged 6 commits into from
Apr 8, 2024

Conversation

BugBountyzip
Copy link
Contributor

@BugBountyzip BugBountyzip commented Apr 4, 2024

Bambda Contributions

  • Bambda has a valid header, featuring an @author annotation and suitable description
  • Bambda compiles and executes as expected
  • Only .bambda files have been added or modified (README.md files are automatically updated / generated after PR merge)

@BugBountyzip
Copy link
Contributor Author

Hello Team,

I hope this message finds you all well. I'm back and I've been working on a new script that I wanted to share with you.

The script is designed to detect "101 Switching Protocols" in HTTP responses. Upon detection, it highlights the responses in red and appends notes, if enabled. I've attached the script to this email for your review.

Please let me know if you have any questions or suggestions for improvement. I look forward to hearing your feedback.

Best regards,

Copy link
Contributor

@ps-porpoise ps-porpoise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your submission, we've left you a couple of suggestions :)

Proxy/HTTP/DetectServerNames.bambda Outdated Show resolved Hide resolved
Proxy/HTTP/Detect101SwitchingProtocols.bambda Outdated Show resolved Hide resolved
@BugBountyzip
Copy link
Contributor Author

Done I Changed it to

/**

  • Bambda Script to Detect "101 Switching Protocols" in HTTP Response
  • @author Tur24Tur / BugBountyzip (https://github.com/BugBountyzip)
  • It identifies if the HTTP response status code is 101 (Switching Protocols).
    **/

// Ensure there is a response and check if the status code is 101
return requestResponse.hasResponse() && requestResponse.response().statusCode() == 101;

Copy link
Contributor

@Hannah-PortSwigger Hannah-PortSwigger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@ps-porpoise ps-porpoise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ps-porpoise ps-porpoise merged commit 2997781 into PortSwigger:main Apr 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants