techgaun / github-dorks

Find leaked secrets via github search
Apache License 2.0
2.81k stars 591 forks source link

Problem when run #56

Closed Doujinx closed 9 months ago

Doujinx commented 1 year ago

$ python3 github-dork.py -r https://github.com/techgaun/github-dorks Traceback (most recent call last): File "/home/kali/Programs/github-dorks/github-dork.py", line 4, in import github3 as github File "/home/kali/.local/lib/python3.11/site-packages/github3/init.py", line 18, in from .api import ( File "/home/kali/.local/lib/python3.11/site-packages/github3/api.py", line 11, in from .github import GitHub, GitHubEnterprise File "/home/kali/.local/lib/python3.11/site-packages/github3/github.py", line 13, in from .auths import Authorization File "/home/kali/.local/lib/python3.11/site-packages/github3/auths.py", line 12, in from .models import GitHubCore File "/home/kali/.local/lib/python3.11/site-packages/github3/models.py", line 19, in from .session import GitHubSession File "/home/kali/.local/lib/python3.11/site-packages/github3/session.py", line 4, in from collections import Callable ImportError: cannot import name 'Callable' from 'collections' (/usr/lib/python3.11/collections/init.py)

Can you help me with that ?

techgaun commented 1 year ago

Thanks for the report. Maybe its not working with python 3.11. I'll check it sometime coming weekend and see if I can get a fix out.

4auvar commented 1 year ago

Hi There,

I have also faced the same problem. This seems like an issue with latest python version and code of github3 package. I have python3.10 installed.

so the solution is to change 2 files: one is '~/.local/lib/python3.10/site-packages/github3/session.py' and other one is ~/.local/lib/python3.10/site-packages/github3/structs.py

in session.py file search & replace from collections import Callable with from collections.abc import Callable

and in structs.py file search & replace class GitHubIterator(models.GitHubCore, collections.Iterator): with class GitHubIterator(models.GitHubCore, collections.abc.Iterator):

I hope this helps.

g0sha987 commented 1 year ago

$ python3 github-dork.py -r https://github.com/techgaun/github-dorks Traceback (most recent call last): File "/home/kali/Programs/github-dorks/github-dork.py", line 4, in import github3 as github File "/home/kali/.local/lib/python3.11/site-packages/github3/init.py", line 18, in from .api import ( File "/home/kali/.local/lib/python3.11/site-packages/github3/api.py", line 11, in from .github import GitHub, GitHubEnterprise File "/home/kali/.local/lib/python3.11/site-packages/github3/github.py", line 13, in from .auths import Authorization File "/home/kali/.local/lib/python3.11/site-packages/github3/auths.py", line 12, in from .models import GitHubCore File "/home/kali/.local/lib/python3.11/site-packages/github3/models.py", line 19, in from .session import GitHubSession File "/home/kali/.local/lib/python3.11/site-packages/github3/session.py", line 4, in from collections import Callable ImportError: cannot import name 'Callable' from 'collections' (/usr/lib/python3.11/collections/init.py)

Can you help me with that ?

Hi try to update the lib: pip3 install --upgrade github3.py

dbfreem commented 10 months ago

@techgaun this issue should be able to be closed now that #58 is merged.

techgaun commented 9 months ago

Thanks closing as fixed by #58