opsdisk / pagodo

pagodo (Passive Google Dork) - Automate Google Hacking Database scraping and searching
GNU General Public License v3.0
2.67k stars 487 forks source link

Getting HTTP code 503 (google detects) after 3rd dork #30

Closed syriusbughunt closed 5 years ago

syriusbughunt commented 5 years ago

Hi!

I was wondering if you could give me some tips on how to get undetected from Google with pagodo, after only the 3rd dork in a list of 373 dorks I got detect with the following syntax:

python3 pagodo.py -g ALL_dorks.txt -s -e 35.0 -l 700 -j 1.1

[*] Search ( 3 / 373 ) for Google dork [ inurl:/index.jsf filetype:jsf ] and waiting 70.1710817159225 seconds between searches using User-Agent 'Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)' [-] Error with dork: inurl:/index.jsf filetype:jsf [-] EXCEPTION: HTTP Error 503: Service Unavailable

Thanks!

syriusbughunt commented 5 years ago

May I suggest to add maybe an option '--proxy' that would load a list of VALID proxies or socks and throttle between them when they get error 503? It's kinda easy for me to say that but for the dev I don't know if this is hard to do... anyways if I can do some testing or anything, let me know!

opsdisk commented 5 years ago

Hi @syriusbughunt - The defaults have worked for me in the past. Keep -l at 100, definitely randomize the user agent (don't use -u). It's a game of patience coming from 1 IP.

For the proxy, you could use proxychains. You provide a list of proxies, enable random_chain, and set chain_len = 1 to have it round robin through them. Here's what my /etc/proxychains4.conf file looks like. The two proxies are local SOCKS proxies.

random_chain
chain_len = 1
proxy_dns 
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
[ProxyList]
socks4  127.0.0.1 9050
socks4  127.0.0.1 9051

Then just throw proxychains infront and you should be good:

proxychains python3 pagodo.py -g ALL_dorks.txt -s -e 35.0 -l 700 -j 1.1

I wrote a book on SSH tunneling, port redirection, and utilizing proxies if you want to learn more about it: https://cph.opsdisk.com

opsdisk commented 5 years ago

Actually, try with round_robin enabled instead of random_chain. In my testing, it switches proxies with each lookup.

syriusbughunt commented 5 years ago

Awesome solution! Will be definitely useful with also others applications, do you mind leaving this issue opened for a small time (just for the time I try it out) ?

Thanks !

opsdisk commented 5 years ago

Not at all, as long as you let me know what worked for you and any data you collected on speed/efficiencies (you were able to cut the delay down to 3 seconds with 5 servers, stuff like that). If it works well, I'll add it to the README.

opsdisk commented 5 years ago

@syriusbughunt Did that work for you?

opsdisk commented 5 years ago

https://github.com/opsdisk/pagodo/pull/31