Search in Google custom engine for a keyword in the text and analyze this for match with regular expressions.
Usable in the stage of "information gathering" in pentesting for analysis OSINT.
Sites that get contents "raw" for processing: github.com, gist.github.com, pastebin.com, pastee.org, and pastie.org. All sites are supported, but the HTML is processed completely in search of a match with regular expressions.
#Dependencies (Python 2.7) google-api-python-client ( https://github.com/google/google-api-python-client )
#Instructions
-
You need a Google Account, for use Google custom search engine (engine-id) and Google custom API (api-key).
-
Follow tutorial ... https://developers.google.com/custom-search/json-api/v1/introduction
-
./regex is a example of regular expressions file, format is first line category started with #, second line regular expression ... and repeat ... and repeat.
-
Regular expressions ONLY allow ONE group of capture, is REQUIRED. ()
-
JSON output file format:
[ u'http://pastebin.com/AB51SAQS2', [ 'Email',[ '[email protected]','[email protected]' ] ], u'htpp://pastee.org/jw5151a', [ 'Password',[ 'Mypasswordis123', 'Mypass' ],'EMail',[ '[email protected]' ] ] ]
#Command Example
./pasteAnalyzer.py -q CTF -a AIYLZ-fX33rwmo -e 016273:o_yf_nza -r regex -j JSON -v
#Arguments
-h, --help
show this help message and exit
-q QUERY, --query QUERY Search query
-a APIKEY, --api-key APIKEY Google custom search Api Key
-e ENGINEID, --engine-id ENGINEID Google custom search Engine Id
-r REGEXFILE, --regex-file REGEXFILE File with regex for analysis
-j JSON, --json JSON
Output to JSON file
-v, --verbose
Verbose mode
#Faraday Plugin The plugin add a new host "pasteAnalyzer", a new interface "Results" and a new Service "Web". In this service all results of pasteAnalyzer are loaded.
Install is simple, copy the faradayPlugin folder of this repository to {FARADAY_INSTALL_DIR}/plugins/repo/ Rename "faradayPlugin" to pasteAnalyzer. Ready!