A custom Google search (to bypass some limitations on Google with regards to timeouts, vpns etc)
The tool has been coded to only return 100 (max) URLs from google search. Google only allows 100 results. You can get 100 from pages 1-10 or pages 11-20 etc, but only ever 100 max results at a time.
A Limitation imposed by Google.
WARNING you will quickly hit the Google limit and will need a paid account to get more. Script has been edited to allow number choice 1-100 results
Great for OSINT and Google Dorks!
git clone https://github.com/AssassinUKG/googleSearcher.git
cd googleSearcher
pip install -r requirements.txt
cd gSearcher
python3 gsearcher.py
python3 gsearcher.py -s "filetype:pdf site:tesla.com"
python3 gsearcher.py -s "cats" -p 4
python3 gsearcher.py -s "dogs" -n 30 -p 3
usage: gSearch.py [-h] [-s SEARCHTERM] [-n NUMRESULTS] [-p PAGE]
options:
-h, --help show this help message and exit
-s SEARCHTERM, --searchTerm SEARCHTERM
Enter a search term!
-n NUMRESULTS, --numResults NUMRESULTS
Enter the number of results to fetch (max 100)
-p PAGE, --page PAGE Enter the page number
** Update: 04/07/2023: Added option for number of results to help free users **
You will need a...
- GOOGLE API Key
- GOOGLE CUSTOM SEARCH ENGINE ID
Link: https://console.cloud.google.com/ To create your application's API key:
Create a new key:
- Open the Google API Console.
- Create or select a project.
- On the Credentials page, get an existing API key or create a new one (Create credentials > API key). You can restrict the key before using it in production by clicking Restrict key.
Protect your API key by changing the restrictions to only search API or whatever you need.
- Goto https://programmablesearchengine.google.com/controlpanel/all
- Add a new search engine and hit save after (see image for settings)
- Get your search engine ID
Now in the gsearcher.py file replace the variables with your key and cse id.
my_api_key = "Your GOOGLE API KEY"
my_cse_id = "YOU Custom Search Engine ID"
Now you're ready to get results!
Added option for number of results to help free users