obheda12 / GitDorker

A Python program to scrape secrets from GitHub through usage of a large repository of dorks.
2.3k stars 419 forks source link

Getting error #41

Open stish834 opened 2 years ago

stish834 commented 2 years ago

/ _ / / / / , / -|_-</ // / / _(-< //||\/_/_,//__/___/


[+] SUCCESS | RESULTS RETURNED [#] NEUTRAL | NO RESULTS RETURNED [-] FAILURE | RATE LIMITS OR API FAILURE

QUERY PROVIDED: *.com

[-] Traceback (most recent call last): File "GitDorker.py", line 404, in sys.stdout.write(colored('%s' % new_url, 'white')) NameError: name 'new_url' is not defined

a88xss commented 2 years ago

Hi, I have a similar error when I search for specific users, any recommendations?

[-] Traceback (most recent call last): File "GitDorker.py", line 527, in sys.stdout.write(colored('%s' % new_url, 'white')) NameError: name 'new_url' is not defined

soulinux commented 2 years ago

Error

[+] SUCCESS | RESULTS RETURNED 
[#] NEUTRAL | NO RESULTS RETURNED
[-] FAILURE | RATE LIMITS OR API FAILURE 

QUERY PROVIDED: domain

[-] Traceback (most recent call last):
GitDorker/GitDorker.py", line 404, in <module> sys.stdout.write(colored('%s' % new_url, 'white'))
NameError: name 'new_url' is not defined

Troubleshooting

$ curl https://api.github.com/search/code    
{
  "message": "Validation Failed",
  "errors": [
    {
      "resource": "Search",
      "field": "q",
      "code": "missing"
    }
  ],
  "documentation_url": "https://docs.github.com/v3/search"
}

This error is related to failure to authenticate on Github with the given Token. It is necessary to generate a new token:

https://github.com/settings/tokens

Creating a token

1. Verify your email address, if it hasn't been verified yet.

2. In the upper-right corner of any page, click your profile photo, then click Settings.

3. In the left sidebar, click Developer settings.

4. In the left sidebar, click Personal access tokens.

5. Click Generate new token.

6. Give your token a descriptive name.