knock icon indicating copy to clipboard operation
knock copied to clipboard

Error importing dns_socket

Open gorums opened this issue 2 years ago • 4 comments

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 avatar Apr 07 '22 15:04 gorums

Hi @gorums, what operating system are you using?

drego85 avatar Apr 07 '22 15:04 drego85

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

guelfoweb avatar Apr 08 '22 08:04 guelfoweb

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?

ckeiituk avatar Apr 11 '22 02:04 ckeiituk

Привет @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

DanielFromRussia30 avatar May 15 '22 05:05 DanielFromRussia30