1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 06:01:28 +00:00

Support -v0 in Zenmap

This commit is contained in:
dmiller
2017-01-11 17:01:51 +00:00
parent 9b86dadb58
commit 99de2621cd
2 changed files with 8 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
# Nmap Changelog ($Id$); -*-text-*- # Nmap Changelog ($Id$); -*-text-*-
o [Zenmap][GH#626] Zenmap now properly handles the -v0 (no output) option,
which was added in Nmap 7.10. Previously, this was treated the same as not
specifying -v at all. [lymanZerga11]
o [GH#630] Updated or removed some OpenSSL library calls that were deprecated o [GH#630] Updated or removed some OpenSSL library calls that were deprecated
in OpenSSL 1.1. [eroen] in OpenSSL 1.1. [eroen]

View File

@@ -716,6 +716,8 @@ class NmapOptions(object):
arg = "" arg = ""
try: try:
self["-v"] = int(arg) self["-v"] = int(arg)
if self["-v"] == 0:
self["-v"] = -1
except ValueError: except ValueError:
if reduce(lambda x, y: x and y, if reduce(lambda x, y: x and y,
map(lambda z: z == "v", arg), True): map(lambda z: z == "v", arg), True):
@@ -778,6 +780,8 @@ class NmapOptions(object):
if self["-f"]: if self["-f"]:
opt_list.extend(["-f"] * self["-f"]) opt_list.extend(["-f"] * self["-f"])
if self["-v"]: if self["-v"]:
if self["-v"] == -1:
opt_list.append("-v0")
opt_list.extend(["-v"] * self["-v"]) opt_list.extend(["-v"] * self["-v"])
if self["-F"]: if self["-F"]: