nessus 0.1.0.beta.2 → 0.1.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2c1c0fae3097739e68704fc86483644f8112fd8
4
- data.tar.gz: fa1143d83cd658676be94a6ea72c9ea3ebddaf74
3
+ metadata.gz: b59d70b93a191677ac086d9bfe2eab33eab4d2be
4
+ data.tar.gz: e1b9606aae021062e1c8a82d446fbc1d1766c812
5
5
  SHA512:
6
- metadata.gz: 385976fd50f9b4304fbbdf96a232b5af17623854c52361a0d3e68c8d18d15bb9916496a2df8059e16298144a1678bf20ef5eaa64b06976aa209241bd94602373
7
- data.tar.gz: 4d7482059229c866aae704bd5f22aab8cad8a01db3ba78ffa18f028e2930b2b64d68e25685cce33fd720de04c40f65f5ef34a417b347dfd14d3a35f70c1af8ec
6
+ metadata.gz: 2fe11d49420101ccad9dea641a376321aa1170cb68c3caba48a420cd34444c5b1608c4da199722d2bec3ea7cc92a74112dd496ca73c3ec10ca628bb779fef60b
7
+ data.tar.gz: 79caba2cdf7d96e08bcfc88309382e73e3b02f8064595a390622a2304008b125ebe835362b72d9dded08726e8ea76d53312d66204da3e00940b37447114fbab7
@@ -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.class == Array
95
+ if hostlist.is_a? Array
96
96
  hostlist.map {|host| host['hostname']}
97
97
  else
98
- Array[hostlist['hostname']]
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['port'].map do |port|
107
- [port['portnum'], port['protocol']]
108
- end
109
- else
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
 
@@ -1,4 +1,4 @@
1
1
  module Nessus
2
2
  # The version of the Nessus.rb library
3
- VERSION = '0.1.0.beta.2'
3
+ VERSION = '0.1.0.beta.3'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nessus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta.2
4
+ version: 0.1.0.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erran Carey