-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9b6dac
commit e32d323
Showing
22 changed files
with
885 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ nessus_file_reader.egg-info | |
test_files | ||
.vscode | ||
_build | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import nessus_file_reader as nfr | ||
|
||
nessus_scan_file = './your_nessus_file.nessus' | ||
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}') | ||
print(f"File name: {file_name}") | ||
print(f"File size: {file_size}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,28 @@ | ||
import nessus_file_reader as nfr | ||
nessus_scan_file = './your_nessus_file.nessus' | ||
|
||
nessus_scan_file = "./your_nessus_file.nessus" | ||
root = nfr.file.nessus_scan_file_root_element(nessus_scan_file) | ||
|
||
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}') | ||
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}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import nessus_file_reader as nfr | ||
nessus_scan_file = './your_nessus_file.nessus' | ||
|
||
nessus_scan_file = "./your_nessus_file.nessus" | ||
root = nfr.file.nessus_scan_file_root_element(nessus_scan_file) | ||
|
||
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}') | ||
pido_19506 = nfr.plugin.plugin_output(root, report_host, "19506") | ||
print(f"Nessus Scan Information Plugin Output:\n{pido_19506}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import nessus_file_reader as nfr | ||
nessus_scan_file = './your_nessus_file.nessus' | ||
|
||
nessus_scan_file = "./your_nessus_file.nessus" | ||
root = nfr.file.nessus_scan_file_root_element(nessus_scan_file) | ||
|
||
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}') | ||
pidos_14272 = nfr.plugin.plugin_outputs(root, report_host, "14272") | ||
print(f"All findings for Netstat Portscanner (SSH): \n{pidos_14272}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
import nessus_file_reader as nfr | ||
nessus_scan_file = './your_nessus_file.nessus' | ||
|
||
nessus_scan_file = "./your_nessus_file.nessus" | ||
root = nfr.file.nessus_scan_file_root_element(nessus_scan_file) | ||
|
||
for report_host in nfr.scan.report_hosts(root): | ||
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') | ||
see_also = nfr.plugin.report_item_value(report_item, 'see_also') | ||
description = nfr.plugin.report_item_value(report_item, 'description') | ||
plugin_name = nfr.plugin.report_item_value(report_item, 'pluginName') | ||
print('\t', plugin_id, ' \t\t\t', risk_factor, ' \t\t\t', plugin_name) | ||
print(see_also) | ||
print(description) | ||
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") | ||
see_also = nfr.plugin.report_item_value(report_item, "see_also") | ||
description = nfr.plugin.report_item_value(report_item, "description") | ||
plugin_name = nfr.plugin.report_item_value(report_item, "pluginName") | ||
print("\t", plugin_id, " \t\t\t", risk_factor, " \t\t\t", plugin_name) | ||
print(see_also) | ||
print(description) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
import nessus_file_reader as nfr | ||
nessus_scan_file = './your_nessus_file.nessus' | ||
|
||
nessus_scan_file = "./your_nessus_file.nessus" | ||
root = nfr.file.nessus_scan_file_root_element(nessus_scan_file) | ||
|
||
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) | ||
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})') | ||
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})" | ||
) |
Oops, something went wrong.