Skip to main content

nessus file reader by LimberDuck (pronounced *ˈlɪm.bɚ dʌk*) is a python modulecreated to quickly parse nessus files containing the results of scansperformed by using Nessus by (C) Tenable, Inc.

Project description

nessus file reader by LimberDuck (pronounced ˈlɪm.bɚ dʌk) is a python module created to quickly parse nessus files containing the results of scans performed by using Nessus by (C) Tenable, Inc. This module will let you get data through functions grouped into categories like file, scan, host and plugin to get specific information from the provided nessus scan files.

License repo_size code_size supported_platform

1 Main features

  • read data from nessus files containing results of scans performed by using Nessus by (C) Tenable, Inc.

  • use nfr_example_script.py. to see examples

2 Usage

  1. Install nessus-file-reader module.

    pip install nessus-file-reader
  2. Import nessus-file-reader module.

    import nessus_file_reader as nfr
  3. Use file functions to get details about provided file e.g. root, file name, file size.

    nessus_scan_file = './your_nessus_file.nessus'
    root = nfr.file.nessus_scan_file_root_element(nessus_scan_file)
    file_name = nfr.file.nessus_scan_file_name_with_path(nessus_scan_file)
    file_size = nfr.file.nessus_scan_file_size_human(nessus_scan_file)
    print(f'File name: {file_name}')
    print(f'File size: {file_size}')
  4. Use scan functions to get details about provided scan e.g. report name, number of target/scanned/credentialed hosts, scan time start/end/elapsed and more.

    report_name = nfr.scan.report_name(root)
    number_of_target_hosts = nfr.scan.number_of_target_hosts(root)
    number_of_scanned_hosts = nfr.scan.number_of_scanned_hosts(root)
    number_of_scanned_hosts_with_credentialed_checks_yes = nfr.scan.number_of_scanned_hosts_with_credentialed_checks_yes(root)
    scan_time_start = nfr.scan.scan_time_start(root)
    scan_time_end = nfr.scan.scan_time_end(root)
    scan_time_elapsed = nfr.scan.scan_time_elapsed(root)
    print(f' Report name: {report_name}')
    print(f' Number of target/scanned/credentialed hosts: {number_of_target_hosts}/{number_of_scanned_hosts}/{number_of_scanned_hosts_with_credentialed_checks_yes}')
    print(f' Scan time START - END (ELAPSED): {scan_time_start} - {scan_time_end} ({scan_time_elapsed})')
  5. Use host functions to get details about hosts from provided scan e.g. report hosts names, operating system, hosts scan time start/end/elapsed, number of Critical/High/Medium/Low/None findings and more.

    for report_host in nfr.scan.report_hosts(root):
        report_host_name = nfr.host.report_host_name(report_host)
        report_host_os = nfr.host.detected_os(report_host)
        report_host_scan_time_start = nfr.host.host_time_start(report_host)
        report_host_scan_time_end = nfr.host.host_time_end(report_host)
        report_host_scan_time_elapsed = nfr.host.host_time_elapsed(report_host)
        report_host_critical = nfr.host.number_of_plugins_per_risk_factor(report_host, 'Critical')
        report_host_high = nfr.host.number_of_plugins_per_risk_factor(report_host, 'High')
        report_host_medium = nfr.host.number_of_plugins_per_risk_factor(report_host, 'Medium')
        report_host_low = nfr.host.number_of_plugins_per_risk_factor(report_host, 'Low')
        report_host_none = nfr.host.number_of_plugins_per_risk_factor(report_host, 'None')
        print(f'  Report host name: {report_host_name}')
        print(f'  Report host OS: {report_host_os}')
        print(f'  Host scan time START - END (ELAPSED): {report_host_scan_time_start} - {report_host_scan_time_end} ({report_host_scan_time_elapsed})')
        print(f'  Critical/High/Medium/Low/None findings: {report_host_critical}/{report_host_high}/{report_host_medium}/{report_host_low}/{report_host_none}')
  6. Use plugin functions to get details about plugins reported in provided scan e.g. plugins ID, plugins risk factor, plugins name.

    print('\tPlugin ID\t\tRisk Factor\t\t\t\tPlugin Name')
    report_items_per_host = nfr.host.report_items(report_host)
    for report_item in report_items_per_host:
        plugin_id = int(nfr.plugin.report_item_value(report_item, 'pluginID'))
        risk_factor = nfr.plugin.report_item_value(report_item, 'risk_factor')
        plugin_name = nfr.plugin.report_item_value(report_item, 'pluginName')
        print('\t', plugin_id, '  \t\t\t', risk_factor, '  \t\t\t', plugin_name)
  7. If you want to get output for interesting you plugin e.g. “Nessus Scan Information” use below function

    for report_host in nfr.scan.report_hosts(root):
        pido_19506 = nfr.plugin.plugin_output(root, report_host, '19506')
        print(f'Nessus Scan Information Plugin Output:\n{pido_19506}')
  8. If you know that interesting you plugin occurs more than ones for particular host e.g. “Netstat Portscanner (SSH)” use below function

    for report_host in nfr.scan.report_hosts(root):
        pidos_14272 = nfr.plugin.plugin_outputs(root, report_host, '14272')
        print(f'All findings for Netstat Portscanner (SSH): \n{pidos_14272}')

3 Meta

3.1 Change log

See CHANGELOG.

3.2 Licence

GNU GPLv3: LICENSE.

3.3 Authors

Damian Krawczyk created nessus file reader by LimberDuck.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nessus_file_reader-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nessus_file_reader-0.1.0-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file nessus_file_reader-0.1.0.tar.gz.

File metadata

  • Download URL: nessus_file_reader-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.0

File hashes

Hashes for nessus_file_reader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2ea060bcb7894f2b73ed4f44e03feafd447ca1fb7f6c76ef66ddad52560bb04
MD5 8ed6623ff6af10660fbd9322bc1b641b
BLAKE2b-256 69cd9ebb8852138250a6fd08068220e925779c7efba55cf1080c62457dada664

See more details on using hashes here.

File details

Details for the file nessus_file_reader-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nessus_file_reader-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.0

File hashes

Hashes for nessus_file_reader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc76fc8c7f80ac8ae124e1651d9a923e74348484d766a9aa9e983e965eb04621
MD5 5d648dd4194b215d7291200511a7cb6c
BLAKE2b-256 f54cad7760c85ab0d11390e95032f12ade48eebbab5fb070a1768fbfc5df9b6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page