ssh-audit: LookupError: unknown encoding: idna
I get an exception when scanning some targets using targets file. When scanning these targets manually, it works fine.
I’m using the ssh-audit.exe in Version 2.5 on a Windows 10 VM.
For me it looks like to be an issue of missing import: import encodings.idna
An exception occurred while scanning 10.2xx.xx.xx:22: Traceback (most recent call last): File “ssh-audit.py”, line 1017, in target_worker_thread File “ssh-audit.py”, line 842, in audit File “ssh_socket.py”, line 155, in connect File “ssh_socket.py”, line 85, in _resolve File “socket.py”, line 953, in getaddrinfo LookupError: unknown encoding: idna
An exception occurred while scanning 10.2xx.xxx.xx:22: Traceback (most recent call last): File “ssh-audit.py”, line 1017, in target_worker_thread File “ssh-audit.py”, line 842, in audit File “ssh_socket.py”, line 155, in connect File “ssh_socket.py”, line 85, in _resolve File “socket.py”, line 953, in getaddrinfo LookupError: unknown encoding: idna
An exception occurred while scanning 10.2xx.xxx.xx:22: Traceback (most recent call last): File “ssh-audit.py”, line 1017, in target_worker_thread File “ssh-audit.py”, line 842, in audit File “ssh_socket.py”, line 155, in connect File “ssh_socket.py”, line 85, in _resolve File “socket.py”, line 953, in getaddrinfo LookupError: unknown encoding: idna
An exception occurred while scanning 10.2xx.xx.xx:22: Traceback (most recent call last): File “ssh-audit.py”, line 1017, in target_worker_thread File “ssh-audit.py”, line 842, in audit File “ssh_socket.py”, line 155, in connect File “ssh_socket.py”, line 85, in _resolve File “socket.py”, line 953, in getaddrinfo LookupError: unknown encoding: idna
An exception occurred while scanning 10.2xx.xxx.xx:22: Traceback (most recent call last): File “ssh-audit.py”, line 1017, in target_worker_thread File “ssh-audit.py”, line 842, in audit File “ssh_socket.py”, line 155, in connect File “ssh_socket.py”, line 85, in _resolve File “socket.py”, line 953, in getaddrinfo LookupError: unknown encoding: idna
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (11 by maintainers)
Commits related to this issue
- Fixed Windows-specific crash when multiple threads are used (#152). — committed to jtesta/ssh-audit by jtesta a year ago
- Rolled back Windows multithreading crash fix, as upgrading from Python v3.9 to v3.11 may have fixed the root cause. (#152) — committed to jtesta/ssh-audit by jtesta a year ago
@kastahl Thanks for testing, much appreciated.
This confirms my suspicion that the problem relates to multithreading and appears only to affect the Windows executable version of ssh-audit.
Please leave this ticket open because although we now have a workaround (which is to avoid multiple threads), there is still a bug that needs to be fixed properly.