nessus 0.1.0.beta.2 → 0.1.0.beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/nessus/client/report.rb +8 -9
- data/lib/nessus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b59d70b93a191677ac086d9bfe2eab33eab4d2be
|
4
|
+
data.tar.gz: e1b9606aae021062e1c8a82d446fbc1d1766c812
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fe11d49420101ccad9dea641a376321aa1170cb68c3caba48a420cd34444c5b1608c4da199722d2bec3ea7cc92a74112dd496ca73c3ec10ca628bb779fef60b
|
7
|
+
data.tar.gz: 79caba2cdf7d96e08bcfc88309382e73e3b02f8064595a390622a2304008b125ebe835362b72d9dded08726e8ea76d53312d66204da3e00940b37447114fbab7
|
data/lib/nessus/client/report.rb
CHANGED
@@ -92,22 +92,21 @@ module Nessus
|
|
92
92
|
# @return [Array] of hostnames/IP addresses
|
93
93
|
def report_hostlist(report)
|
94
94
|
hostlist = report_hosts(report)['hostlist']['host']
|
95
|
-
if hostlist.
|
95
|
+
if hostlist.is_a? Array
|
96
96
|
hostlist.map {|host| host['hostname']}
|
97
97
|
else
|
98
|
-
|
98
|
+
[hostlist['hostname']]
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
102
|
# @return [Array<Array>] of port numbers and protocol
|
103
103
|
def report_portlist(report, ip_address)
|
104
|
-
ports = report_ports(report, ip_address)['portlist']
|
105
|
-
if ports
|
106
|
-
ports[
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
nil
|
104
|
+
ports = report_ports(report, ip_address)['portlist']['port']
|
105
|
+
if ports.is_a? Hash
|
106
|
+
ports = [ports]
|
107
|
+
end
|
108
|
+
ports.map do |port|
|
109
|
+
[port['portnum'], port['protocol']]
|
111
110
|
end
|
112
111
|
end
|
113
112
|
|
data/lib/nessus/version.rb
CHANGED