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

Add hash flag, to support multi body hash type. #517

Merged
merged 5 commits into from
Feb 15, 2022

Conversation

M09Ic
Copy link
Contributor

@M09Ic M09Ic commented Feb 11, 2022

#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}

Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

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

LGTM

@ehsandeep ehsandeep merged commit e2b0c16 into projectdiscovery:dev Feb 15, 2022
@atlassion
Copy link

Regarding my request: how to filter this? you already have body-sha256 in json-output by default. Need a filter option by this hash like a "MATCHERS" to filter results. I see only new section "hashes":
...
"body-sha256": "HASH"
...
"hashes": {
"sha256":"HASH"
...

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.

Feature request: support -simhash Please, add BodySHA256 match/filter
4 participants