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

zgrab/zgrab2: HTTP bodies getting mangled #258

Merged
merged 1 commit into from
Mar 24, 2020
Merged

Conversation

bwireman
Copy link
Contributor

@bwireman bwireman commented Mar 23, 2020

  • Use DetermineEncoding To try and translate http bodies to UTF8 if possible.

How to Test

make
echo "qq.com" | ./zgrab2 http --port=443 --use-https --max-size=64 --max-redirects=5 | jq . | grep -o 腾讯首页

And hopefully get that a result. The chinese is the title of qq's webpage and is malformed in current results. https://censys.io/domain/qq.com

Notes & Caveats

  • I've tested this with some of domains from the alexa top million, but I've been unable to run a full 1% scan from scratch-01

  • DetermineEncoding returns a certainty boolean, but at least with qq it was getting the right result even though it was returning a certainty of false, so I decided to ignore it

Issue Tracking

Copy link
Contributor

@justinbastress justinbastress left a comment

Choose a reason for hiding this comment

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

This looks like the right solution, esp since GET / is usually text.

Still feels like it needs BodyBytes or something, but obviously that would be a lot more disruptive.

@dadrian dadrian changed the title [DATA-91] zgrab/zgrab2: HTTP bodies getting mangled HTTP bodies getting mangled Mar 23, 2020
@bwireman bwireman changed the title HTTP bodies getting mangled zgrab/zgrab2: HTTP bodies getting mangled Mar 23, 2020
@bwireman bwireman merged commit 145470a into master Mar 24, 2020
@bwireman bwireman deleted the bw/http_encodings branch March 24, 2020 14:52
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