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

Fixes open port print in port_scan module. #978

Merged

Conversation

tanaydin
Copy link
Contributor

@tanaydin tanaydin commented Dec 9, 2024

This PR fixes found open port printing problem in port_scan module output.
it is printing like this

conditions: open_port: - ''

after that fix, it is

conditions: open_port: - '443'

  • New core framework functionality
  • Bugfix (non-breaking change which fixes an issue)
  • Code refactoring without any functionality changes
  • New or existing module/payload change
  • Localization improvement
  • Dependency upgrade
  • Documentation improvement

Checklist

  • I've followed the contributing guidelines
  • I've run make pre-commit, it didn't generate any changes
  • I've run make test, all tests passed locally

@tanaydin tanaydin force-pushed the fix-for-port-number-in-port-scanner-output branch 2 times, most recently from a3e2328 to 7cd7526 Compare December 9, 2024 05:41
The issue caused the program to erroneously run a regex pattern on HTML content instead of the request data. This was because the port number wasn't displayed in the HTML's body content. The commit rectifies this problem, ensuring that regex operates on the correct data.
@tanaydin tanaydin force-pushed the fix-for-port-number-in-port-scanner-output branch from e86c431 to 2da26e6 Compare December 10, 2024 20:50
@securestep9
Copy link
Collaborator

thank you for your contribution @tanaydin

@securestep9 securestep9 added this pull request to the merge queue Dec 22, 2024
Merged via the queue into OWASP:master with commit 9aaa703 Dec 22, 2024
17 checks passed
@@ -1028,7 +1028,7 @@ payloads:
condition_type: or
conditions:
open_port:
regex: ""
regex: \d{{1,5}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is wrong, it must be like

[0-9]{{1,5}}

\d accepts other alphabets digits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants