Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[-] ERROR with dork: #10

Closed
MelissaMV opened this issue Dec 29, 2017 · 16 comments
Closed

[-] ERROR with dork: #10

MelissaMV opened this issue Dec 29, 2017 · 16 comments

Comments

@MelissaMV
Copy link

I'm getting this error with each dork after every query is that normal?

[-] ERROR with dork: about.php?cartID=

@opsdisk
Copy link
Owner

opsdisk commented Dec 29, 2017

Hi @MelissaMV

Could you provide me the python version (python -V) you are running, the full command line with switches, and the output you're seeing?

@MelissaMV
Copy link
Author

@opsdisk Sure here are the details:

Kali Linux Python 2.7.14

(Note: I asterisk out the site name)

root@kali:~/Desktop/pagodo# python pagodo.py -d http://********.co.tt -g google_dorks.txt -l 50 -s -e 30.0 -j 1.1

[] Initiation timestamp: 20171229_211706
[
] Search ( 1 / 100 ) for Google dork [ "Error Diagnostic Information" intitle:"Error Occurred While" site:http://********.co.tt ] and waiting 61.7573006391 seconds between searches
[-] ERROR with dork: "Error Diagnostic Information" intitle:"Error Occurred While"

[*] Search ( 2 / 100 ) for Google dork [ intitle:index.of finances.xls site:http://********.co.tt ] and waiting 62.7753368763 seconds between searches
[-] ERROR with dork: intitle:index.of finances.xls

...and the errors continues until it reaches the full 50 dorks.

@opsdisk
Copy link
Owner

opsdisk commented Jan 13, 2018

Hi @MelissaMV - sorry it took a while to get back. Try without the http:// prepended to the domain. So just the domain python pagodo.py -d example.com. If that doesn't fix that, it may be that Google is detecting it as a bot, so you need to wait an hour or so.

@MelissaMV
Copy link
Author

@opsdisk thx for your response - i tried what you said without the "http://" but I'm getting the same error, so I guess Google is detecting it as a bot.

Is there a way around this?

@opsdisk
Copy link
Owner

opsdisk commented Jan 14, 2018

Hmmm...what version of the google module do you have?

pip freeze | egrep google

It looks like the latest is 2.0.1 and I was getting some errors with that one. You mind throwing some debug print statements around each main block of code to see where it stops executing and paste that output? I'm trying to determine which line is causing the issues. Something like this:

print("1")
for url in google.search(query, start=0, stop=self.search_max, num=100, pause=pause_time, extra_params={'filter': '0'}, user_agent=google.get_random_user_agent()):
    self.links.append(url)
print("2")

# Since google.search method retreives URLs in batches of 100, ensure the file list only contains the requested amount
if len(self.links) > self.search_max:
    self.links = self.links[:-(len(self.links) - self.search_max)]
print("3")

print("[*] Results: " + str(len(self.links)) + " sites found for Google dork: " + dork)
print("4")
for foundDork in self.links:
    print(foundDork)
print("5")
self.total_dorks += len(self.links)
print("6")
# Only save links with valid results to an output file
if self.save_links and (self.links):
    f = open(self.log_file, 'a')
    f.write('#: ' + dork + "\n")
    for link in self.links:
        f.write(link + "\n")
    f.write("=" * 50 + "\n")
f.close
print("7")

@opsdisk
Copy link
Owner

opsdisk commented Feb 3, 2018

Just pushed up some new code. Let me know if it is still giving you issues.

@MelissaMV
Copy link
Author

yup got the same "ERROR with dork" on every dork in my list including your "google_dorks.txt list and i'm using google 2.0.1...well i guess if its working on your side and not my side its prolly my Kali Linux has some screwed up configuration somewhere lol but thx anywayz for trying to help me :)

Do you know any script that can open dorks in a file in multiple x tabs in firefox or googlechrome?? I mean you can just load a dork file in a script, run the script and it will open a browser that will search for all the dorks in different tabs. May be that doesn't make sense but i was just wondering lol

@thesilas
Copy link
Contributor

thesilas commented Feb 6, 2018

I get the same error as @MelissaMV.

@opsdisk
Copy link
Owner

opsdisk commented Feb 6, 2018

@MelissaMV @thesilas Can you put some print statements between the lines as suggested by #10 (comment)

Trying to figure out where it's failing.

@thesilas
Copy link
Contributor

thesilas commented Feb 6, 2018

@opsdisk I just added the statements as you suggested and got the following output:

python pagodo.py -d ***.** -g google_dorks.txt -l 50 -s -e 35.0 -j 1.1
[*] Initiation timestamp: 20180206_230930
[*] Search ( 1 / 3612 ) for Google dork [ netflix site:***.** ] and waiting 73.4667123037 seconds between searches
1 
[-] ERROR with dork: netflix
[*] Search ( 2 / 3612 ) for Google dork [ "Error Diagnostic Information" intitle:"Error Occurred While" site:***.** ] and waiting 71.2552759055 seconds between searches
1
[-] ERROR with dork: "Error Diagnostic Information" intitle:"Error Occurred While"
[*] Search ( 3 / 3612 ) for Google dork [ intitle:index.of finances.xls site:***.** ] and waiting 72.4720777609 seconds between searches

I added the "netflix" test dork because I manually verified that it returns a result.

python -V
Python 2.7.14+
pip freeze | egrep google
Warning: cannot find svn location for chirp===daily-20170714
google==2.0.0

@opsdisk
Copy link
Owner

opsdisk commented Feb 8, 2018

@thesilas thanks for that info...looks like it's something with googlesearch.search function. Couple of things:

  1. You're using the latest script with googlesearch.search and not google.search
  2. Can you run pip freeze | egrep google again? It should be version 2.0.1.
  3. Install requirements again: pip install -r requirements.txt
  4. Start the python interpreter (by typing python) and run the four lines.
# python
>>> import googlesearch
>>> urls = googlesearch.search("test")
>>> for x in urls:
...     print(x)

That should return some urls.

  1. I doubt it, but it may be something with the domain you're searching for. If you're comfortable sharing it, send me an email at the address found here: https://www.opsdisk.com/#contact and I can try it.

@MelissaMV if you pass a domain to firefox it will open it. So running firefox github.com from the command line will open github.com in a new tab. You could loop through the google dork list and spawn a new tab for each one.

@thesilas
Copy link
Contributor

thesilas commented Feb 8, 2018

@opsdisk thanks for the instructions. It turns out that I didn't install the requirements using

pip install -r requirements.txt

after I did so I didnt get the error anymore and the tool works. So for me the issue could be closed. @MelissaMV did you too run pagodo without first installing the requirements?

@opsdisk I made a pull request with an updated version of the readme that includes a short section regarding the installation because I think that other people might too miss installing the requirements and could end up facing the same error as I did.

@cr4zyd3v
Copy link

cr4zyd3v commented Feb 9, 2018

I'm getting the same error and when print(x) is used i get 503 service unavaible.. the same thing that happens on doork project.. google is banning our requests i think \o/ would be cool if it was possible to request pages with diferent headers like v3n0m does

@thesilas
Copy link
Contributor

thesilas commented Feb 9, 2018

@marciks after some request I too get 503. not sure yet what a good -e delay value is. I just tried with 65 but after some successfull request I get the 503 error again. Then you have to wait a while or switch to another public source IP. @opsdisk do you use the default values or can you recommend other values that prevent the google detection?

@opsdisk
Copy link
Owner

opsdisk commented Feb 11, 2018

@marciks What HTTP headers are you specifying? Do you mean the User-Agent? I implemented this in my metagoofil fork (https://github.com/opsdisk/metagoofil/blob/master/metagoofil.py#L173) and just realized (thanks to you) I hadn't implemented it in this one. If that's the case, please create an issue and I'll add it in.

@thesilas to answer your question, the defaults (jitter and delay) have worked for me in the past. It took almost 2 days to completely run it my first time through. It's definitely not a quick kill script. Maybe switching up the User-Agent like I suggested above would help.

@opsdisk
Copy link
Owner

opsdisk commented Feb 18, 2018

Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants