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

Zenmap crashes when file not found with error like: "UnicodeEncodeError: 'utf-8' codec can't encode characters in position 897-900: surrogates not allowed" #2822

Open
fyodor opened this issue Apr 25, 2024 · 0 comments
Labels

Comments

@fyodor
Copy link
Member

fyodor commented Apr 25, 2024

We've received many reports (often with tracebacks but very little other context) of Zenmap crashes with a UnicodeEncodeError when a file isn't found. They started with Nmap 7.94, which means it is likely that it relates to the Python3 Zenmap upgrade which considerably changed Unicode handling. Here are some Tracebacks that were sent to the public Nmap development list that might help us track this down:

Traceback (most recent call last):
File "D:\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 476, in execute_command
command_execution.run_scan()
File "D:\Nmap\zenmap\lib\python3.10\site-packages\zenmapCore\NmapCommand.py", line 224, in run_scan
self.command_process = subprocess.Popen(command_list, bufsize=1,
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 971, in init
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 1456, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "D:\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 388, in start_scan_cb
self.execute_command(command, target, profile)
File "D:\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 503, in execute_command
warn_dialog = HIGAlertDialog(
File "D:\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\higwidgets\higdialogs.py", line 114, in init
self.format_secondary_text(secondary_text)
File "dist/zenmap-w64/mingw64/lib/python3.10/site-packages/gi/overrides/Gtk.py", line 632, in format_secondary_text
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 897-900: surrogates not allowed

تم الإرسال من البريد لـ Windows

Version: 7.94

Traceback (most recent call last):
File "D:\xiaodi8\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 476, in execute_command
command_execution.run_scan()
File "D:\xiaodi8\Nmap\zenmap\lib\python3.10\site-packages\zenmapCore\NmapCommand.py", line 224, in run_scan
self.command_process = subprocess.Popen(command_list, bufsize=1,
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 971, in init
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 1456, in _execute_child
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "D:\xiaodi8\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 388, in start_scan_cb
self.execute_command(command, target, profile)
File "D:\xiaodi8\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 503, in execute_command
warn_dialog = HIGAlertDialog(
File "D:\xiaodi8\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\higwidgets\higdialogs.py", line 114, in init
self.format_secondary_text(secondary_text)
File "dist/zenmap-w64/mingw64/lib/python3.10/site-packages/gi/overrides/Gtk.py", line 632, in format_secondary_text
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcb5' in position 792: surrogates not allowed

Version: 7.94
Traceback (most recent call last):
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 476, in execute_command
command_execution.run_scan()
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapCore\NmapCommand.py", line 224, in run_scan
self.command_process = subprocess.Popen(command_list, bufsize=1,
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 971, in init
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 1456, in _execute_child
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 388, in start_scan_cb
self.execute_command(command, target, profile)
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 503, in execute_command
warn_dialog = HIGAlertDialog(
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\higwidgets\higdialogs.py", line 114, in init
self.format_secondary_text(secondary_text)
File "dist/zenmap-w64/mingw64/lib/python3.10/site-packages/gi/overrides/Gtk.py", line 632, in format_secondary_text
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 249-250: surrogates not allowed

Version: 7.94
Traceback (most recent call last):
File "D:\basicTools\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 476, in execute_command
command_execution.run_scan()
File "D:\basicTools\nmap\zenmap\lib\python3.10\site-packages\zenmapCore\NmapCommand.py", line 224, in run_scan
self.command_process = subprocess.Popen(command_list, bufsize=1,
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 971, in init
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 1456, in _execute_child
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\basicTools\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 388, in start_scan_cb
self.execute_command(command, target, profile)
File "D:\basicTools\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 503, in execute_command
warn_dialog = HIGAlertDialog(
File "D:\basicTools\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\higwidgets\higdialogs.py", line 114, in init
self.format_secondary_text(secondary_text)
File "dist/zenmap-w64/mingw64/lib/python3.10/site-packages/gi/overrides/Gtk.py", line 632, in format_secondary_text
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 601-606: surrogates not allowed

Version: 7.94
Traceback (most recent call last):
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 476, in execute_command
command_execution.run_scan()
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapCore\NmapCommand.py", line 224, in run_scan
self.command_process = subprocess.Popen(command_list, bufsize=1,
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 971, in init
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 1456, in _execute_child
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 388, in start_scan_cb
self.execute_command(command, target, profile)
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 503, in execute_command
warn_dialog = HIGAlertDialog(
File "C:\Program Files (x86)\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\higwidgets\higdialogs.py", line 114, in init
self.format_secondary_text(secondary_text)
File "dist/zenmap-w64/mingw64/lib/python3.10/site-packages/gi/overrides/Gtk.py", line 632, in format_secondary_text
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 97-102: surrogates not allowed

Version: 7.94
Traceback (most recent call last):
File "C:\Users\jimod\Desktop\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 476, in execute_command
command_execution.run_scan()
File "C:\Users\jimod\Desktop\Nmap\zenmap\lib\python3.10\site-packages\zenmapCore\NmapCommand.py", line 224, in run_scan
self.command_process = subprocess.Popen(command_list, bufsize=1,
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 971, in init
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 1456, in _execute_child
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\jimod\Desktop\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 388, in start_scan_cb
self.execute_command(command, target, profile)
File "C:\Users\jimod\Desktop\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 503, in execute_command
warn_dialog = HIGAlertDialog(
File "C:\Users\jimod\Desktop\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\higwidgets\higdialogs.py", line 114, in init
self.format_secondary_text(secondary_text)
File "dist/zenmap-w64/mingw64/lib/python3.10/site-packages/gi/overrides/Gtk.py", line 632, in format_secondary_text
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcd0' in position 143: surrogates not allowed

Version: 7.94
Traceback (most recent call last):
File "D:\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 476, in execute_command
command_execution.run_scan()
File "D:\nmap\zenmap\lib\python3.10\site-packages\zenmapCore\NmapCommand.py", line 224, in run_scan
self.command_process = subprocess.Popen(command_list, bufsize=1,
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 971, in init
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 1456, in _execute_child
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 388, in start_scan_cb
self.execute_command(command, target, profile)
File "D:\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 503, in execute_command
warn_dialog = HIGAlertDialog(
File "D:\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\higwidgets\higdialogs.py", line 114, in init
self.format_secondary_text(secondary_text)
File "dist/zenmap-w64/mingw64/lib/python3.10/site-packages/gi/overrides/Gtk.py", line 632, in format_secondary_text
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 160-161: surrogates not allowed

Version: 7.94
Traceback (most recent call last):
File "D:\a\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 476, in execute_command
command_execution.run_scan()
File "D:\a\Nmap\zenmap\lib\python3.10\site-packages\zenmapCore\NmapCommand.py", line 224, in run_scan
self.command_process = subprocess.Popen(command_list, bufsize=1,
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 971, in init
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 1456, in _execute_child
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\a\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 388, in start_scan_cb
self.execute_command(command, target, profile)
File "D:\a\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 503, in execute_command
warn_dialog = HIGAlertDialog(
File "D:\a\Nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\higwidgets\higdialogs.py", line 114, in init
self.format_secondary_text(secondary_text)
File "dist/zenmap-w64/mingw64/lib/python3.10/site-packages/gi/overrides/Gtk.py", line 632, in format_secondary_text
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 611-614: surrogates not allowed

从 Windows 版邮件发送

Version: 7.94

Traceback (most recent call last):
File "D:\tools\1\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 476, in execute_command
command_execution.run_scan()
File "D:\tools\1\nmap\zenmap\lib\python3.10\site-packages\zenmapCore\NmapCommand.py", line 224, in run_scan
self.command_process = subprocess.Popen(command_list, bufsize=1,
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 971, in init
File "dist/zenmap-w64/mingw64/lib/python3.10/subprocess.py", line 1456, in _execute_child
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\tools\1\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 388, in start_scan_cb
self.execute_command(command, target, profile)
File "D:\tools\1\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\ScanInterface.py", line 503, in execute_command
warn_dialog = HIGAlertDialog(
File "D:\tools\1\nmap\zenmap\lib\python3.10\site-packages\zenmapGUI\higwidgets\higdialogs.py", line 114, in init
self.format_secondary_text(secondary_text)
File "dist/zenmap-w64/mingw64/lib/python3.10/site-packages/gi/overrides/Gtk.py", line 632, in format_secondary_text
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 1010-1011: surrogates not allowed

@fyodor fyodor added the Zenmap label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant