#!/usr/bin/python3

import os
import sys
import time
import threading


os.system('clear')

verde = '\033[37m'
vermelho = '\033[30m'
original = '\033[0;0m'
negrito = '\033[1m'

import google
try: 
    from googlesearch import search 
except ImportError:  
    print("Porfavor 'pip3 install google'")


print('\r\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
print('x------------------------------------------------------------------------------------------x')
print('x--------------------------------------- '+verde+'GODORK 1.0'+original+' ---------------------------------------x')
print('x-'+ negrito+'by:felipelobo' + original + '----------------------------------------------------------------------------x')
print('x-------------------------------------------------------------------------------------'+verde+'alfa'+original+'-x')
print('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n')
print("")



#LISTA DE DORKS#

dork = ["filetype:txt", '"index of"', 'filetype:docs', 'filetype:sql', 'filetype:json','filetype:xml',"ext:php", "ext:asp", "inurl:?id=", "-www"]

#print('Recomendado de 5 a 10 urls.')
#Codigo#
#try:
	#num = input("Numero de urls? ")
	#pause = input("Numero de pausas? ")

#except KeyboardInterrupt:
#	print ('Digite Algo')



print ('')
print(negrito+vermelho+'x------------------------------------------------------------------------x'+original)
req = input("Google: ")
print('Voce esta pesquisando sobre:' +negrito+req+original+'...')
print(vermelho+'x--'+verde+negrito+'DORKS'+vermelho+'----------------------------'+negrito+verde+'URL'+vermelho+negrito+'----------------------------------x'+original)
print('')
    
def procura(req):
    for req2 in dork:
        request = ':'+ req + ' ' + req2  
        time.sleep(15)
        for result in search(request, stop=10, pause=3): 
            print( request + '   ----     ' + result)


p = threading.Thread(target=procura, args=(req, ))
p.start()