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

Adding option to skip remaining paths on unresponsive host #358

Merged
merged 3 commits into from
Aug 16, 2021

Conversation

Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented Aug 14, 2021

Example use:-

httpx -l subs.txt -paths apis.txt -max-host-error 10

This will discard all the hosts from subs.txt given the host errored about 10 times, as default this feature is disabled.

Following errors are considered to count for max-host-error flag.

"no address found for host"
"no address found for host (Client.Timeout exceeded while awaiting headers)"
"context deadline exceeded (Client.Timeout exceeded while awaiting headers)"

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Aug 14, 2021
@Mzack9999 Mzack9999 self-assigned this Aug 14, 2021
@Mzack9999 Mzack9999 linked an issue Aug 14, 2021 that may be closed by this pull request
@Mzack9999 Mzack9999 added the Status: Review Needed The issue has a PR attached to it which needs to be reviewed label Aug 16, 2021
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

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

Currently supported errors

  • "no address found for host"
  • "no address found for host (Client.Timeout exceeded while awaiting headers)"
  • "context deadline exceeded (Client.Timeout exceeded while awaiting headers)"

@Mzack9999
Copy link
Member Author

@ehsandeep This should be already covered:

ncat -klvp 1000
[DBG] Failed 'http://localhost:1000/aaa': GET http://localhost:1000/aaa giving up after 1 attempts: Get "http://localhost:1000/aaa": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
[DBG] Failed 'localhost:1000': skipping as previously unresponsive
[DBG] Failed 'localhost:1000': skipping as previously unresponsive
[DBG] Failed 'localhost:1000': skipping as previously unresponsive
[DBG] Failed 'localhost:1000': skipping as previously unresponsive
[DBG] Failed 'localhost:1000': skipping as previously unresponsive
[DBG] Failed 'localhost:1000': skipping as previously unresponsive
[DBG] Failed 'localhost:1000': skipping as previously unresponsive
[DBG] Failed 'localhost:1000': skipping as previously unresponsive
[DBG] Failed 'localhost:1000': skipping as previously unresponsive

@ehsandeep ehsandeep merged commit 111aef4 into dev Aug 16, 2021
@ehsandeep ehsandeep linked an issue Aug 16, 2021 that may be closed by this pull request
@ehsandeep ehsandeep deleted the bugfix-skip-paths-unresponsive-host branch August 16, 2021 18:06
@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] optional skip for unresponsive hosts (host:port) for path scans [Feature] Stop scan after X timeouts
3 participants