Merged
Conversation
e4b01d8 to
dfd80c3
Compare
Mzack9999
requested changes
Mar 1, 2023
Contributor
Author
|
Mzack9999
approved these changes
Mar 2, 2023
Member
Mzack9999
left a comment
There was a problem hiding this comment.
lgtm
$ go run . -e hunterhow -q 'product.name=\"jira\"' -f host -v
...
[hunterhow] dev.proaimltd.com.cn
[hunterhow] build.bmb1688.com
Comment on lines
+45
to
+71
| pageQuery := 1 | ||
|
|
||
| for { | ||
| hunterhowRequest := &Request{ | ||
| Query: query.Query, | ||
| PageSize: query.Limit, | ||
| Page: pageQuery, | ||
| } | ||
|
|
||
| if numberOfResults > query.Limit { | ||
| break | ||
| } | ||
|
|
||
| hunterhowResponse := agent.query(hunterhowRequest.buildURL(session.Keys.HunterHowToken), session, results) | ||
| if hunterhowResponse == nil { | ||
| break | ||
| } | ||
|
|
||
| if len(hunterhowResponse) == 0 { | ||
| break | ||
| } | ||
|
|
||
| numberOfResults += len(hunterhowResponse) | ||
| pageQuery += 1 | ||
| } | ||
| }() | ||
|
|
Member
There was a problem hiding this comment.
@xm1k3 ,not sure if you want to implement in this PR or a new one . but just to point out this implementation looks good if no of results < 1000 (10 requests are made in serial) but if there are more than 1000> requests it takes time which shouldn't be the case .
From api docs a example response returns "total":5994 in response so after first request we can get total results and calculate number of pages available and fetch them according to limit cli option in parallel, this way it won't take that much time
so query returns 5994 results it is ~60 req
60 req in serial (current implementation) takes ~40-50 sec
60 req in parallel takes ~10 sec
*estimated time here is approx and depends on various factors
tarunKoyalwar
approved these changes
Mar 3, 2023
Member
tarunKoyalwar
left a comment
There was a problem hiding this comment.
lgtm ! suggested some possible optimizations
$ ./uncover -hh "product.name=\"jira\"" -f host -v
__ ______ _________ _ _____ _____
/ / / / __ \/ ___/ __ \ | / / _ \/ ___/
/ /_/ / / / / /__/ /_/ / |/ / __/ /
\__,_/_/ /_/\___/\____/|___/\___/_/ v1.0.2
projectdiscovery.io
[hunterhow] gentlecode.com
[hunterhow] www.gentlecode.com
[hunterhow] host64.ru
[hunterhow] jira.erbanyy.com
[hunterhow] jira.ptponclick.com
ehsandeep
approved these changes
Mar 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
query guide:
https://hunter.how/guide