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 importing dns_socket #122

Open
gorums opened this issue Apr 7, 2022 · 4 comments
Open

Error importing dns_socket #122

gorums opened this issue Apr 7, 2022 · 4 comments

Comments

@gorums
Copy link

gorums commented Apr 7, 2022

python3 /app/knock/knockpy/knockpy.py yahoo.com

Traceback (most recent call last):
File "/app/knock/knockpy/knockpy.py", line 11, in
from . import dns_socket
ImportError: attempted relative import with no known parent package

@gorums gorums changed the title Error importing import dns_socket Error importing dns_socket Apr 7, 2022
@drego85
Copy link
Collaborator

drego85 commented Apr 7, 2022

Hi @gorums, what operating system are you using?

@guelfoweb
Copy link
Owner

Hi @gorums, if you run knockpy from the folder, you should execute it from the "knock" folder because it looks for dns_socket module in this folder.

cd /app/knock/
python3 knockpy.py yourdomain.com

@ckeiituk
Copy link

ckeiituk commented Apr 11, 2022

On windows 11 (PowerShell) works fine. Getting the same error on wsl2 (Kali) as mentioned above, though. Is there a way to run it on wsl2?

@Shipy4kaRU
Copy link

Привет @gorums, если вы запускаете knockpy из папки, вы должны выполнить его из папки "knock", потому что он ищет модуль dns_socket в этой папке.

cd /app/knock/ python3 knockpy.py yourdomain.com

I have been looking for a solution to the problem for a long time, but the solution turned out to be so simple... thank you

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

5 participants