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

HTTP Timeout doesn't work as expected #109

Open
ajholland opened this issue May 1, 2018 · 3 comments
Open

HTTP Timeout doesn't work as expected #109

ajholland opened this issue May 1, 2018 · 3 comments

Comments

@ajholland
Copy link
Contributor

I specified the following on the command line:

echo google.com | ./zgrab2 http --port 8080 --timeout 3

(A site and port I expect to not connect but timeout after a certain point)

Rather than timing out after 3 seconds, according to the metadata at the end, it continues through for 75 seconds.

{"statuses":{"http":{"successes":0,"failures":1}},"start":"2018-05-01T11:55:54-04:00","end":"2018-05-01T11:57:10-04:00","duration":"1m15.374277319s"}

@justinbastress
Copy link
Contributor

I think I see the problem -- transport.DialTLS is set, but not transport.Dial / transport.DialContext. Confirmed that if I add --use-https to your example, it does time out as expected.

@ajholland
Copy link
Contributor Author

Makes sense! I'm also noticing that if I specify a timeout of say 8 seconds, it actually times out after 4, this follows through if I specify a timeout of 10 seconds it times out after 5.

I can look into this and the above if you're not already on it, I've been working on #73.

@ajholland
Copy link
Contributor Author

It seems like this is fixed, except for when applying the --use-https flag. Now applying that flag results in the above behavior where a timeout of 8 seconds ends up timing out after 4 seconds (probably rtt, didn't look much into this)

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

No branches or pull requests

2 participants