1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 05:01:29 +00:00

Zenmap: Ensure files are opened with UTF-8 encoding

This commit is contained in:
dmiller
2025-03-04 17:06:32 +00:00
parent 068dd4b0df
commit 49c25e6431
3 changed files with 6 additions and 5 deletions

View File

@@ -226,7 +226,8 @@ class ScriptInterface:
# Separate stderr to avoid breaking XML parsing with "Warning: File
# ./nse_main.lua exists, but Nmap is using...".
stderr = tempfile.TemporaryFile(
mode="r", prefix=APP_NAME + "-script-help-stderr-")
mode="r", prefix=APP_NAME + "-script-help-stderr-",
encoding="utf-8")
log.debug("Script interface: running %s" % repr(command_string))
nmap_process = NmapCommand(command_string)
try: