LimberDuck / nessus-file-reader

CLI tool and python module which enables you to parse nessus scan files from Nessus and Tenable.SC by (C) Tenable, Inc.
https://limberduck.org
GNU General Public License v3.0
39 stars 4 forks source link

Error when NoneType value in operating_system - function detected_os in host.py #8

Closed ricardosupo closed 8 months ago

ricardosupo commented 2 years ago

Using Python 3.10.4 in Linux:

_python3.10/site-packages/nessus_file_reader/host/host.py", line 119, in detected_os
    if """ in operating_system:
TypeError: argument of type 'NoneType' is not iterable_

Solution: Verify if is NoneType before if condition:

if operating_system is not None:
    if """ in operating_system:
        operating_system = str(operating_system).strip('["').strip('"]')
    else:
        operating_system = str(operating_system).strip('["').strip('"]')
else:
    operating_system = ''
damian-krawczyk commented 1 year ago

@ricardosupo check latest release v0.4.2 #10 . This suppose to be fixed now.

https://github.com/spyr0-sec/helper-scripts/issues/1