Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This is a universal google dorker
- # You can use this for getting urls of every dork you know.
- # Just input the dork and number of pages,
- # the script will take care of the rest.
- #-----------------------------------------------------
- # Name : Google Dorker.py
- # Version : beta
- # Author : Anubis
- # Contact : [email protected]
- # Facebook : www.facebook.com/zerouplink
- #-----------------------------------------------------
- ###########################################################
- global logo
- logo = '''
- ___ _ ___ _
- / __|___ ___ __ _| |___ | \ ___ _ _| |_____ _ _
- | (_ / _ \/ _ \/ _` | / -_) | |) / _ \ '_| / / -_) '_|
- \___\___/\___/\__, |_\___| |___/\___/_| |_\_\___|_|
- |___/
- (- Version : beta -)
- (- Author : Anubis -)
- (- MSF Forum Moderator -)'''
- try:
- from pygoogle import pygoogle
- except ImportError:
- print "[!] Pygoogle file not found!"
- print "[!] Program can't continue"
- print "[!] Get pygoogle file from this link"
- print "\n\t\t[ http://pastebin.com/Q0xVF2nV ]"
- class dorker():
- def __init__(self):
- print logo
- search_dork = raw_input("\n\nEnter Dork : ")
- pages = input("Enter number of pages : ")
- f_output = raw_input("Enter file to output urls : ")
- if search_dork != '' and pages != '':
- self.dork(search_dork,pages,f_output)
- def dork(self,search_term,p,output):
- print "[+] Searching for %s " % search_term
- gs = pygoogle(search_term)
- gs.pages = p
- print "[+] Results Found : %s " % (gs.get_result_count())
- if gs.get_result_count() == 0: print "[-] No Results Found"; exit
- print "[+] Fetching [%s] Results " % (gs.get_result_count())
- url_list = gs.get_urls()
- print "[+] Got [%s] URLs" % (len(url_list))
- print "[+] Writing URLs to [%s] " % (output)
- with open(output,'w') as w_file:
- for i in url_list: w_file.write(i+'\n')
- print "[+] URLs saved to [%s] " % (output)
- def main():
- google = dorker()
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement