gitscraper
gitscraper
A tool which scrapes public github repositories for common naming conventions in variables, folders and files
This current upload contains the results from 16,018,052 php files from 102808 different repositories
Gitscraper examines PHP files to create SecList / Dictionary files which can be used against any environment ( not just PHP ) for pentesting & bounty hunters.
How to Run
php gitscraper.php {GitHub Username} {GitHub Personal KEY}
It will collect the following:
- Folder & File Names
- GET & POST variables
- HTTP Header Variables
- Laravel GET,POST,PUT & DELETE Routes
Each time one of the above is found it is added into its appropriate file in the /raw directory. These raw files are then sorted and ordered by the most duplicated content at the top and then cleaned as best as possible and put in the /cleaned directory
Current command for cleaning files ( to be run in /raw directory )
for filename in *; do sort $filename | grep -v â â | grep -v -P âtâ | uniq -d -c | sort -n -r | cut -c 9- > ../cleaned/$filename ; done
- ( sort ) Sort the file so all occurences are next to each other
- ( grep ) Remove lines that contain spaces
- ( grep ) Remove lines that contain tabs
- ( uniq ) Pick out all the uniqe lines and prepend with the number of times found
- ( sort ) Sort by the instance of times found to the most common is at the top
- ( cut ) Remove the instances found number
- ( > ) Echo out to cleaned directory