nexpose 0.8.15 → 0.8.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nexpose/ajax.rb +1 -1
- data/lib/nexpose/device.rb +20 -0
- data/lib/nexpose/error.rb +3 -1
- data/lib/nexpose/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cb45443d83455f41bad616d55864c36548c1bbf
|
4
|
+
data.tar.gz: f42d2cbdc6f3e30cabe2f18c7716ff0542aab120
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d78a1ed3b71c43bb3bf67425a9e0e43620efa44f8ba4f634679acc0093cf1d7a21b29c24981a128e4d2590c69f0618f78e8c495d41eb86201d320d119431dcfe
|
7
|
+
data.tar.gz: fd40da514a564539e5916fe367d4e55c92f34e849a9ca895a056da4ab42947e1220ae752dd492f9940fb82a2846b9e76048be0b52313d0e63243bda3bcf672a4
|
data/lib/nexpose/ajax.rb
CHANGED
@@ -160,7 +160,7 @@ module Nexpose
|
|
160
160
|
raise Nexpose::PermissionError.new(response)
|
161
161
|
else
|
162
162
|
req_type = request.class.name.split('::').last.upcase
|
163
|
-
raise Nexpose::APIError.new(response, "#{req_type} request to #{request.path} failed. #{request.body}")
|
163
|
+
raise Nexpose::APIError.new(response, "#{req_type} request to #{request.path} failed. #{request.body}", response.code)
|
164
164
|
end
|
165
165
|
end
|
166
166
|
|
data/lib/nexpose/device.rb
CHANGED
@@ -109,6 +109,21 @@ module Nexpose
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
+
# Retrieve a list of assets which are incomplete in a given scan. If called
|
113
|
+
# during a scan, this method returns currently incomplete assets which may
|
114
|
+
# be in progress.
|
115
|
+
#
|
116
|
+
# @param [Fixnum] scan_id Unique identifier of a scan.
|
117
|
+
# @return [Array[IncompleteAsset]] List of incomplete assets.
|
118
|
+
#
|
119
|
+
def incomplete_assets(scan_id)
|
120
|
+
uri = "/data/asset/scan/#{scan_id}/incomplete-assets"
|
121
|
+
AJAX.preserving_preference(self, 'scan-incomplete-assets') do
|
122
|
+
data = DataTable._get_json_table(self, uri, {}, 500, nil, false)
|
123
|
+
data.map(&IncompleteAsset.method(:parse_json))
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
112
127
|
def delete_device(device_id)
|
113
128
|
r = execute(make_xml('DeviceDeleteRequest', { 'device-id' => device_id }))
|
114
129
|
r.success
|
@@ -188,4 +203,9 @@ module Nexpose
|
|
188
203
|
end
|
189
204
|
end
|
190
205
|
end
|
206
|
+
|
207
|
+
# Summary object of an incomplete asset for a scan.
|
208
|
+
#
|
209
|
+
class IncompleteAsset < CompletedAsset
|
210
|
+
end
|
191
211
|
end
|
data/lib/nexpose/error.rb
CHANGED
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.8.
|
4
|
+
version: 0.8.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HD Moore
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-
|
14
|
+
date: 2014-12-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rex
|
@@ -143,8 +143,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.
|
146
|
+
rubygems_version: 2.4.3
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Ruby API for Rapid7 Nexpose
|
150
150
|
test_files: []
|
151
|
+
has_rdoc:
|