uncover icon indicating copy to clipboard operation
uncover copied to clipboard

Limit flag not working as intended.

Open parthmalhotra opened this issue 3 years ago • 0 comments

root@m3An-MAcHIn3:/dsk# uncover -q 'nginx' -o test.txt -limit 10 | wc -l

  __  ______  _________ _   _____  _____
 / / / / __ \/ ___/ __ \ | / / _ \/ ___/
/ /_/ / / / / /__/ /_/ / |/ /  __/ /
\__,_/_/ /_/\___/\____/|___/\___/_/ v0.0.8

                projectdiscovery.io

Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
By using uncover, you also agree to the terms of the APIs used.

100
root@m3An-MAcHIn3:/dsk# uncover -q 'nginx' -o test.txt -limit 150 | wc -l

  __  ______  _________ _   _____  _____
 / / / / __ \/ ___/ __ \ | / / _ \/ ___/
/ /_/ / / / / /__/ /_/ / |/ /  __/ /
\__,_/_/ /_/\___/\____/|___/\___/_/ v0.0.8

                projectdiscovery.io

Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
By using uncover, you also agree to the terms of the APIs used.

200
root@m3An-MAcHIn3:/dsk# uncover -q 'nginx' -o test.txt -limit 210 | wc -l

  __  ______  _________ _   _____  _____
 / / / / __ \/ ___/ __ \ | / / _ \/ ___/
/ /_/ / / / / /__/ /_/ / |/ /  __/ /
\__,_/_/ /_/\___/\____/|___/\___/_/ v0.0.8

                projectdiscovery.io

Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
By using uncover, you also agree to the terms of the APIs used.

300

The limit logic is not working properly, For eg in the above case Shodan responds with 100 results per api call, Currently if uncover's limit parameter is < 100 then uncover will make single api request which will output 100 results, if the limit parameter is between 100-200 uncover will send 2 requests and show 200 results and so on, The proper logic should be as follows :

-limit 50 => Make single request to shodan's endpoint, 100 results retrieved => split top 50 results => output -limit 150 => Make 2 requests to shodan's endpoint, 200 results retrieved => split top 150 results => output

and so on.

parthmalhotra avatar Oct 03 '22 13:10 parthmalhotra