Giter Site home page Giter Site logo

Comments (4)

0xAwali avatar 0xAwali commented on May 22, 2024 1

censys depend on cursor value to get next page e.g.

curl -s -u API-KEY:SECRET -H 'Content-Type: application/json' "https://search.censys.io/api/v2/hosts/search?q=company&per_page=100&cursor=base64-value" | jq -r .result.links.next

so token not issue here , I think it will be more efficiency to randomize the multiple tokens instead of one token every time because rate limit per seconds or minutes will not solve this issue if your result e.g. 100k because censys allow 250 queries if you are normal user so e.g. I was using this script to bypass the rate limit and allowed queries

#!/usr/bin/env bash
Query="services.tls.certificates.leaf_data.subject.organization:Facebook\bInc."
TokenCount=$(shuf -n 1 token.txt)
Count=$(curl -s -u $TokenCount -H 'Content-Type: application/json' "https://search.censys.io/api/v2/hosts/search?q=$Query&per_page=100" | jq -r .result.total)
Iters=$(expr "$Count" / 100 + 1)
Cursor=""
for ((I = 1 ; I <= "$Iters" ; I++))
do
	TokenSearch=$(shuf -n 1 token.txt)
	curl -s -u $TokenSearch -H 'Content-Type: application/json' "https://search.censys.io/api/v2/hosts/search?q=$Query&per_page=100&cursor=$Cursor" | jq -r .result.hits[].ip | tee -a result.txt
	sleep 1
	Cursor=$(curl -s -u $TokenSearch -H 'Content-Type: application/json' "https://search.censys.io/api/v2/hosts/search?q=$Query&per_page=100&cursor=$Cursor" | jq -r .result.links.next)
done

from uncover.

ehsandeep avatar ehsandeep commented on May 22, 2024

@0xAwali thanks for creating this issue, about randomisation, it works based on execution, i.e new key will be picked on each execution of uncover and not per request as same key is required to rotate through multiple pages in case of results contains multiple results with higher limits.

from uncover.

ehsandeep avatar ehsandeep commented on May 22, 2024

thanks for sharing more information @0xAwali around randomization improvements, and yes you are right about the rate limit, a default delay would be a better option to avoid the rate limit in general across all the engines.

from uncover.

ehsandeep avatar ehsandeep commented on May 22, 2024

@0xAwali should be fixed on the dev version, now as default delay of 1 second is added.

from uncover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.