nexpose 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +68 -0
- data/README.markdown +3 -0
- data/lib/nexpose/scan_template.rb +42 -42
- data/lib/nexpose/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c5d157c20856a164ee2982bbf4d66895bbf2338
|
4
|
+
data.tar.gz: 8ec9a5560d29c9e19449b19e2a93a307877d5fcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ecf67806e6577ccf7072261a27fb2cfec3f5b3b9e7aae24fad579900309c3cf73869437adaca9fccda5038f75226a50286bbc9a001a4c2dfb7d7db1ebb1ea3a
|
7
|
+
data.tar.gz: b112151d6331a44c6dfe4767e365944e07fd6d10386a22be7fe0e6ed68af75058f51e193aef38e3249dca4ed32e05f3a97523ce34120e72ff56cd0b6a8757510
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
nexpose (0.9.8)
|
5
|
+
rex (~> 2.0, >= 2.0.8)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.3.7)
|
11
|
+
ast (2.0.0)
|
12
|
+
astrolabe (1.3.0)
|
13
|
+
parser (>= 2.2.0.pre.3, < 3.0)
|
14
|
+
codeclimate-test-reporter (0.4.7)
|
15
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
16
|
+
crack (0.4.2)
|
17
|
+
safe_yaml (~> 1.0.0)
|
18
|
+
diff-lcs (1.2.5)
|
19
|
+
docile (1.1.5)
|
20
|
+
multi_json (1.11.0)
|
21
|
+
parser (2.2.0.3)
|
22
|
+
ast (>= 1.1, < 3.0)
|
23
|
+
powerpack (0.1.0)
|
24
|
+
rainbow (2.0.0)
|
25
|
+
rex (2.0.8)
|
26
|
+
rspec (3.2.0)
|
27
|
+
rspec-core (~> 3.2.0)
|
28
|
+
rspec-expectations (~> 3.2.0)
|
29
|
+
rspec-mocks (~> 3.2.0)
|
30
|
+
rspec-core (3.2.2)
|
31
|
+
rspec-support (~> 3.2.0)
|
32
|
+
rspec-expectations (3.2.0)
|
33
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
+
rspec-support (~> 3.2.0)
|
35
|
+
rspec-mocks (3.2.1)
|
36
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
+
rspec-support (~> 3.2.0)
|
38
|
+
rspec-support (3.2.2)
|
39
|
+
rubocop (0.29.1)
|
40
|
+
astrolabe (~> 1.3)
|
41
|
+
parser (>= 2.2.0.1, < 3.0)
|
42
|
+
powerpack (~> 0.1)
|
43
|
+
rainbow (>= 1.99.1, < 3.0)
|
44
|
+
ruby-progressbar (~> 1.4)
|
45
|
+
ruby-progressbar (1.7.1)
|
46
|
+
safe_yaml (1.0.4)
|
47
|
+
simplecov (0.9.2)
|
48
|
+
docile (~> 1.1.0)
|
49
|
+
multi_json (~> 1.0)
|
50
|
+
simplecov-html (~> 0.9.0)
|
51
|
+
simplecov-html (0.9.0)
|
52
|
+
vcr (2.9.3)
|
53
|
+
webmock (1.20.4)
|
54
|
+
addressable (>= 2.3.6)
|
55
|
+
crack (>= 0.3.2)
|
56
|
+
|
57
|
+
PLATFORMS
|
58
|
+
ruby
|
59
|
+
|
60
|
+
DEPENDENCIES
|
61
|
+
bundler (~> 1.3)
|
62
|
+
codeclimate-test-reporter (~> 0.4.6)
|
63
|
+
nexpose!
|
64
|
+
rspec (~> 3.2)
|
65
|
+
rubocop (~> 0.29.0)
|
66
|
+
simplecov (~> 0.9.1)
|
67
|
+
vcr (~> 2.9.3)
|
68
|
+
webmock (~> 1.20.4)
|
data/README.markdown
CHANGED
@@ -9,6 +9,9 @@ Check out https://github.com/rapid7/nexpose-client/wiki for walk-throughs and re
|
|
9
9
|
|
10
10
|
This gem is heavily used for internal, automated testing of the Nexpose product. It provides calls to the Nexpose XML APIs version 1.1 and 1.2 (except for some multi-tenant operations). It also includes a number of helper methods which are not currently exposed through alternate means.
|
11
11
|
|
12
|
+
## Release Notes
|
13
|
+
|
14
|
+
Release notes are available on the [Releases](https://github.com/rapid7/nexpose-client/releases) page.
|
12
15
|
|
13
16
|
## Contributions
|
14
17
|
|
@@ -177,7 +177,7 @@ module Nexpose
|
|
177
177
|
end
|
178
178
|
|
179
179
|
# Enable/disable IP stack fingerprinting
|
180
|
-
# @param [Boolean] enable or disable IP stack fingerprinting
|
180
|
+
# @param [Boolean] enable Enable or disable IP stack fingerprinting
|
181
181
|
def enable_ip_stack_fingerprinting=(enable)
|
182
182
|
ns = REXML::XPath.first(@xml, 'ScanTemplate/Plugins/Plugin[@name="java/NetworkScanners"]')
|
183
183
|
param = REXML::XPath.first(ns, './param[@name="ipFingerprintEnabled"]')
|
@@ -191,82 +191,82 @@ module Nexpose
|
|
191
191
|
end
|
192
192
|
end
|
193
193
|
|
194
|
-
# Enable/
|
195
|
-
# @param [Boolean] enable or disable ICMP device discovery
|
196
|
-
def
|
194
|
+
# Enable/disable ICMP device discovery
|
195
|
+
# @param [Boolean] enable Enable or disable ICMP device discovery
|
196
|
+
def enable_icmp_device_discovery=(enable)
|
197
197
|
icmp = REXML::XPath.first(@xml, 'ScanTemplate/DeviceDiscovery/CheckHosts/icmpHostCheck')
|
198
198
|
icmp.attributes['enabled'] = (enable ? 1 : 0)
|
199
199
|
end
|
200
200
|
|
201
|
-
#
|
202
|
-
# @param [
|
203
|
-
def
|
201
|
+
# Enable/disable TCP device discovery
|
202
|
+
# @param [Boolean] enable Enable or disable TCP device discovery
|
203
|
+
def enable_tcp_device_discovery=(enable)
|
204
204
|
tcp = REXML::XPath.first(@xml, 'ScanTemplate/DeviceDiscovery/CheckHosts/TCPHostCheck')
|
205
|
-
|
205
|
+
tcp.attributes['enabled'] = (enable ? 1 : 0)
|
206
206
|
end
|
207
207
|
|
208
|
-
#
|
209
|
-
# @param [
|
210
|
-
def
|
208
|
+
# Set custom TCP ports to scan for device discovery
|
209
|
+
# @param [Array] ports Ports to scan for device discovery
|
210
|
+
def tcp_device_discovery_ports=(ports)
|
211
211
|
tcp = REXML::XPath.first(@xml, 'ScanTemplate/DeviceDiscovery/CheckHosts/TCPHostCheck')
|
212
|
-
tcp
|
212
|
+
REXML::XPath.first(tcp, './portList').text = ports.join(',')
|
213
213
|
end
|
214
214
|
|
215
|
-
#
|
216
|
-
# @param [
|
217
|
-
def
|
215
|
+
# Enable/disable UDP device discovery
|
216
|
+
# @param [Boolean] enable Enable or disable UDP device discovery
|
217
|
+
def enable_udp_device_discovery=(enable)
|
218
218
|
udp = REXML::XPath.first(@xml, 'ScanTemplate/DeviceDiscovery/CheckHosts/UDPHostCheck')
|
219
|
-
|
219
|
+
udp.attributes['enabled'] = (enable ? 1 : 0)
|
220
220
|
end
|
221
221
|
|
222
|
-
#
|
223
|
-
# @param [
|
224
|
-
def
|
222
|
+
# Set custom UDP ports to scan for UDP device discovery
|
223
|
+
# @param [Array] ports Ports to scan for UDP device discovery
|
224
|
+
def udp_device_discovery_ports=(ports)
|
225
225
|
udp = REXML::XPath.first(@xml, 'ScanTemplate/DeviceDiscovery/CheckHosts/UDPHostCheck')
|
226
|
-
udp
|
226
|
+
REXML::XPath.first(udp, './portList').text = ports.join(',')
|
227
|
+
end
|
228
|
+
|
229
|
+
# Enable or disable TCP port scanning.
|
230
|
+
# @param [Boolean] enable Enable or disable TCP ports
|
231
|
+
def enable_tcp_service_discovery=(enable)
|
232
|
+
service_ports = REXML::XPath.first(@xml, 'ScanTemplate/ServiceDiscovery/TCPPortScan')
|
233
|
+
service_ports.attributes['mode'] = 'none' unless enable
|
227
234
|
end
|
228
235
|
|
229
|
-
#
|
230
|
-
# @param [Array] ports to scan
|
231
|
-
def
|
236
|
+
# Set custom TCP ports to scan for TCP service discovery
|
237
|
+
# @param [Array] ports Ports to scan for TCP service discovery
|
238
|
+
def tcp_service_discovery_ports=(ports)
|
232
239
|
service_ports = REXML::XPath.first(@xml, 'ScanTemplate/ServiceDiscovery/TCPPortScan')
|
233
240
|
service_ports.attributes['mode'] = "custom"
|
234
241
|
service_ports.attributes['method'] = "syn"
|
235
242
|
REXML::XPath.first(service_ports, './portList').text = ports.join(",")
|
236
243
|
end
|
237
244
|
|
238
|
-
# Exclude TCP ports
|
239
|
-
# @param [Array] ports to exclude from
|
240
|
-
def
|
245
|
+
# Exclude TCP ports during TCP service discovery
|
246
|
+
# @param [Array] ports TCP ports to exclude from TCP service discovery
|
247
|
+
def exclude_tcp_service_discovery_ports=(ports)
|
241
248
|
service_ports = REXML::XPath.first(@xml, 'ScanTemplate/ServiceDiscovery/ExcludedTCPPortScan')
|
242
249
|
REXML::XPath.first(service_ports, './portList').text = ports.join(",")
|
243
250
|
end
|
244
251
|
|
245
|
-
#
|
246
|
-
# @param [
|
247
|
-
def
|
248
|
-
service_ports = REXML::XPath.first(@xml, 'ScanTemplate/ServiceDiscovery/TCPPortScan')
|
249
|
-
service_ports.attributes['mode'] = 'none' unless enable
|
250
|
-
end
|
251
|
-
|
252
|
-
# Add custom UDP ports to scan for services
|
253
|
-
# @param [Array] ports to scan
|
254
|
-
def udp_service_ports=(ports)
|
252
|
+
# Set custom UDP ports to scan for UDP service discovery
|
253
|
+
# @param [Array] ports Ports to scan during UDP service discovery
|
254
|
+
def udp_service_discovery_ports=(ports)
|
255
255
|
service_ports = REXML::XPath.first(@xml, 'ScanTemplate/ServiceDiscovery/UDPPortScan')
|
256
256
|
service_ports.attributes['mode'] = "custom"
|
257
257
|
REXML::XPath.first(service_ports, './portList').text = ports.join(",")
|
258
258
|
end
|
259
259
|
|
260
|
-
# Exclude UDP ports when
|
261
|
-
# @param [Array] ports to exclude from
|
262
|
-
def
|
260
|
+
# Exclude UDP ports when performing UDP service discovery
|
261
|
+
# @param [Array] ports UDP ports to exclude from UDP service discovery
|
262
|
+
def exclude_udp_service_discovery_ports=(ports)
|
263
263
|
service_ports = REXML::XPath.first(@xml, 'ScanTemplate/ServiceDiscovery/ExcludedUDPPortScan')
|
264
264
|
REXML::XPath.first(service_ports, './portList').text = ports.join(",")
|
265
265
|
end
|
266
266
|
|
267
|
-
#
|
268
|
-
# @param [Boolean] enable or disable UDP
|
269
|
-
def
|
267
|
+
# Enable or disable UDP service discovery
|
268
|
+
# @param [Boolean] enable Enable or disable UDP service discovery
|
269
|
+
def enable_udp_service_discovery=(enable)
|
270
270
|
service_ports = REXML::XPath.first(@xml, 'ScanTemplate/ServiceDiscovery/UDPPortScan')
|
271
271
|
service_ports.attributes['mode'] = 'none' unless enable
|
272
272
|
end
|
data/lib/nexpose/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexpose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HD Moore
|
@@ -144,6 +144,7 @@ files:
|
|
144
144
|
- CONTRIBUTING.md
|
145
145
|
- COPYING
|
146
146
|
- Gemfile
|
147
|
+
- Gemfile.lock
|
147
148
|
- README.markdown
|
148
149
|
- Rakefile
|
149
150
|
- lib/README.md
|