mirror of
https://github.com/nmap/nmap.git
synced 2026-08-31 15:03:20 +00:00
Cap vuln logo number at 5. Fixes #3431
This commit is contained in:
parent
e1ce99d5a2
commit
0ffa21e7bc
1 changed files with 4 additions and 4 deletions
|
|
@ -119,11 +119,11 @@ if pixmap_path:
|
|||
|
||||
|
||||
def get_os_icon(host):
|
||||
return ICONS["%s_icon" % get_os(host)]
|
||||
return ICONS.get("%s_icon" % get_os(host), None)
|
||||
|
||||
|
||||
def get_os_logo(host):
|
||||
return ICONS["%s_logo" % get_os(host)]
|
||||
return ICONS.get("%s_logo" % get_os(host), None)
|
||||
|
||||
|
||||
OSNAMES = {
|
||||
|
|
@ -162,6 +162,6 @@ def get_os(host):
|
|||
|
||||
|
||||
def get_vulnerability_logo(open_ports):
|
||||
ports = min(int(open_ports), 10)
|
||||
ports = min(int(open_ports), 9)
|
||||
lvl = (ports // 2) + 1
|
||||
return ICONS['vl_%d_logo' % (lvl,)]
|
||||
return ICONS.get('vl_%d_logo' % (lvl,), None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue