-
Notifications
You must be signed in to change notification settings - Fork 315
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
Encoding used for JSON output for binary data #263
Comments
Possibly related to #197. |
Based on initial investigations, it seems that (at least some) "non-printable" characters are replaced by |
Conversion of binary responses to UTF8 occasionally yields U+FFFD [replacement characters](https://en.wikipedia.org/wiki/Specials_(Unicode_block)) (see zmap#197, zmap#263). As a result it is not possible to restore the original response. This introduces the `--hex` option to the `banner` module. When enabled, the `banner` value will contain server response in hex. Refs zmap#197, zmap#263
Conversion of binary responses to UTF8 occasionally yields U+FFFD [replacement characters](https://en.wikipedia.org/wiki/Specials_(Unicode_block)) (see #197, #263). As a result it is not possible to restore the original response. This introduces the `--hex` option to the `banner` module. When enabled, the `banner` value will contain server response in hex. Refs #197, #263 #325
Fixed in #325. Thanks! |
Unfortunately, this option is only valid for the |
Does anyone has a sort of workarround for this encoding issue specifically for the |
I added
Along with the flag at the top of the source file to enable it. |
@p-l- is this still an issue as far as you know? I haven't encountered it so I'm not able to tell If so, @LloydLabs, would you have time to send the changes in that fork you mentioned as a PR? |
Hi,
First, thanks a lot for this project!
I use ZGrab2 to fetch the content of the HTTP answer from the JSON output. I have an issue when that content is binary (e.g., a blob, or encrypted data, etc.): it is somehow encoded to JSON UTF.
However, in Python (this problem is in IVRE) when I
json.loads()
a line, then try to.encode()
the content of the field that contains the HTTP content, I don't get the same value than the original file.Do you have any idea if there is a bug somewhere, or if there is something wrong in what I do / expect?
Thanks!
The text was updated successfully, but these errors were encountered: