Add hash flag, to support multi body hash type. #517
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#489
#488
add
-hash
flag, support body select multiple hash types.example:
echo "baidu.com" | httpx -hash md5,sha256,mmh3,simhash
output:
https://baidu.com [f9ae0e69a566407c669d0b2b634e3499] [3568381554487407123a8684c0918f59d3097a8c6c6970f60a8275cad3f4b275] [3641448047] [15074517028871015366]
echo "baidu.com" | httpx -hash md5,sha256,mmh3,simhash -json
output:
{"timestamp":"2022-02-11T18:11:16.8055152+08:00","scheme":"https","port":"443","path":"/","body-sha256":"3568381554487407123a8684c0918f59d3097a8c6c6970f60a8275cad3f4b275","header-sha256":"70b4d4a698a384f13948c1372c6ee583bbdd8ff5f7671dae23da3f95860efb14","a":["220.181.38.148","220.181.38.251"],"url":"https://baidu.com:443","input":"baidu.com","location":"http://www.baidu.com/","title":"302 Found","webserver":"bfe/1.0.8.18","content-type":"text/html","method":"GET","host":"220.181.38.148","content-length":161,"status-code":302,"response-time":"2.3005656s","failed":false,"hashes":{"md5":"f9ae0e69a566407c669d0b2b634e3499","mmh3":"3641448047","sha256":"3568381554487407123a8684c0918f59d3097a8c6c6970f60a8275cad3f4b275","simhash":"15074517028871015366"},"lines":8,"words":4}