guelfoweb / knock

Knock Subdomain Scan
GNU General Public License v3.0
3.76k stars 848 forks source link

Error importing dns_socket #122

Open gorums opened 2 years ago

gorums commented 2 years ago

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

drego85 commented 2 years ago

Hi @gorums, what operating system are you using?

guelfoweb commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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