nexpose 4.0.5 → 5.0.0

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: ffb24477fcce2011e0280d8fe44a89b69650d519
4
- data.tar.gz: 71184beb0d88f81a577b55b42494d39fc336668f
3
+ metadata.gz: 4b36711705abe08891f4b9a2a91e2661b660f589
4
+ data.tar.gz: b23983acf0e13451dd48f2028decf89b5363c439
5
5
  SHA512:
6
- metadata.gz: 10f6fc4cf712638978d5bb37a79175598a016d3292d9c94c3071c4ea4456c5c1a82f3cb28f9a34e30f608a9be3f79e4c3d3a0167f0e527dab8d29787f1543878
7
- data.tar.gz: 8c451a39c54f5633298b2c3a087f0a5bd305bf161e5bc95f14c596a093ed56c7e070cb7e62b520826af42c0434ff385421f26a7bc4755224e1189df7ee45ff25
6
+ metadata.gz: 6918bea23f955aa033e9e61cd9249da0257daf89a422dbd714d63906e595a89ed60607067ab074b66a500946e3b3b73d6410186bc4570e5140c910b2941c14f5
7
+ data.tar.gz: a47dca8c883ae9a5319f6d54d59ab3179e7d94562e7f962c07f33050f872b5c0dfa2ff5c041d411301e6ac199053ac43ed5d2d881cc7d12948937fe71297bb64
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nexpose (3.3.1)
4
+ nexpose (5.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -16,7 +16,7 @@ GEM
16
16
  safe_yaml (~> 1.0.0)
17
17
  diff-lcs (1.2.5)
18
18
  docile (1.1.5)
19
- multi_json (1.11.0)
19
+ multi_json (1.10.1)
20
20
  parser (2.2.0.3)
21
21
  ast (>= 1.1, < 3.0)
22
22
  powerpack (0.1.0)
@@ -25,7 +25,7 @@ GEM
25
25
  rspec-core (~> 3.2.0)
26
26
  rspec-expectations (~> 3.2.0)
27
27
  rspec-mocks (~> 3.2.0)
28
- rspec-core (3.2.2)
28
+ rspec-core (3.2.1)
29
29
  rspec-support (~> 3.2.0)
30
30
  rspec-expectations (3.2.0)
31
31
  diff-lcs (>= 1.2.0, < 2.0)
@@ -64,3 +64,6 @@ DEPENDENCIES
64
64
  simplecov (~> 0.9.1)
65
65
  vcr (~> 2.9.3)
66
66
  webmock (~> 1.20.4)
67
+
68
+ BUNDLED WITH
69
+ 1.12.2
@@ -8,7 +8,8 @@ module Nexpose
8
8
  attr_accessor :blackout_type
9
9
  # The repeat interval based upon type.
10
10
  attr_accessor :blackout_interval
11
- # The earliest date to generate the report on (in ISO 8601 format).
11
+ # Starting time of the blackout (in unix epoch with milliseconds. Example: 1464956590000)
12
+ # The timezone is the timezone of the console. If the console timezone is not supported it defaults to utc.
12
13
  attr_accessor :blackout_start
13
14
  # The amount of time, in minutes, a blackout period should last.
14
15
  attr_accessor :blackout_duration
@@ -25,20 +25,26 @@ module Nexpose
25
25
  # non-members.
26
26
  class Email
27
27
  # Send as file attachment or zipped file to individuals who are not members
28
- # of the report access list. One of: file|zip
28
+ # of the report access list.
29
+ # [String] Attachment format, 'file' | 'zip'.
29
30
  attr_accessor :send_as
30
31
  # Send to all the authorized users of sites, groups, and assets.
32
+ # [Fixnum] 1 | 0
31
33
  attr_accessor :to_all_authorized
32
34
  # Send to users on the report access list.
35
+ # [String] Attachment format 'file' | 'zip'
33
36
  attr_accessor :send_to_acl_as
34
- # Format to send to users on the report access list. One of: file|zip|url
37
+ # Format to send to users on the report access list.
38
+ # [String] Attachment format 'file' | 'zip' | 'url'
35
39
  attr_accessor :send_to_owner_as
36
-
37
40
  # Sender that e-mail will be attributed to.
41
+ # [String] an email address
38
42
  attr_accessor :sender
39
43
  # SMTP relay server.
44
+ # [String] the IP address, host name or FQDN of the SMTP server.
40
45
  attr_accessor :smtp_relay_server
41
- # Array of report recipients (i.e., not already on the report access list).
46
+ # Recipients will be in form of email address.
47
+ # [Array<String>] E-mail addresses of additional report recipients (i.e., not already on the report access list).
42
48
  attr_accessor :recipients
43
49
 
44
50
  def initialize(to_all_authorized, send_to_owner_as, send_to_acl_as, send_as)
@@ -135,17 +141,12 @@ module Nexpose
135
141
  attr_accessor :type
136
142
  # The repeat interval based upon type.
137
143
  attr_accessor :interval
138
- # The earliest date to generate the report on (in ISO 8601 format).
144
+ # Starting time of the scheduled scan (in ISO 8601 format).
139
145
  attr_accessor :start
140
-
141
146
  # The amount of time, in minutes, to allow execution before stopping.
142
147
  attr_accessor :max_duration
143
148
  # The date after which the schedule is disabled, in ISO 8601 format.
144
149
  attr_accessor :not_valid_after
145
-
146
- # TODO: Remove this unused attribute
147
- attr_accessor :incremental
148
-
149
150
  # Extended attributes added with the new scheduler implementation
150
151
  attr_accessor :is_extended
151
152
  attr_accessor :hour
@@ -154,12 +155,18 @@ module Nexpose
154
155
  attr_accessor :day
155
156
  attr_accessor :occurrence
156
157
  attr_accessor :start_month
158
+ # Timezone in which start time run. If not set will default to console timezone.
159
+ # If console timezone is not supported it defaults to utc.
157
160
  attr_accessor :timezone
158
161
  attr_accessor :next_run_time
159
-
160
162
  # scan-schedule attributes
161
163
  attr_accessor :repeater_type
164
+ # Scan template to use when starting a scan job.
162
165
  attr_accessor :scan_template_id
166
+ # Starting time of the scheduled scan (in ISO 8601 format). Relative to the console timezone
167
+ attr_accessor :console_start
168
+ # The timezone of the console.
169
+ attr_accessor :console_timezone
163
170
 
164
171
  # @param [Time] start
165
172
  def initialize(type, interval, start, enabled = true, scan_template_id = nil)
@@ -186,6 +193,8 @@ module Nexpose
186
193
  schedule.not_valid_after = Nexpose::ISO8601.to_time(hash[:not_valid_after_date]) if hash[:not_valid_after_date]
187
194
  schedule.timezone = hash[:time_zone] if hash[:time_zone]
188
195
  schedule.next_run_time = hash[:next_run_time] if hash[:next_run_time]
196
+ schedule.console_start = Nexpose::ISO8601.to_time(hash[:console_start_date]) if hash[:console_start_date]
197
+ schedule.console_timezone = hash[:console_time_zone] if hash[:console_time_zone]
189
198
 
190
199
  unless repeat_scan_hash.nil?
191
200
  schedule.type = repeat_scan_hash[:type]
@@ -247,7 +256,6 @@ module Nexpose
247
256
  xml.attributes['start'] = @start if @start
248
257
  xml.attributes['maxDuration'] = @max_duration if @max_duration
249
258
  xml.attributes['notValidAfter'] = @not_valid_after if @not_valid_after
250
- xml.attributes['incremental'] = @incremental ? 1 : 0 if @incremental
251
259
  xml.attributes['repeaterType'] = @repeater_type if @repeater_type
252
260
  xml.attributes['is_extended'] = @is_extended if @is_extended
253
261
  xml.attributes['hour'] = @hour if @hour
@@ -274,7 +282,6 @@ module Nexpose
274
282
  # Optional parameters.
275
283
  schedule.max_duration = xml.attributes['maxDuration'].to_i if xml.attributes['maxDuration']
276
284
  schedule.not_valid_after = xml.attributes['notValidAfter'] if xml.attributes['notValidAfter']
277
- schedule.incremental = (xml.attributes['incremental'] && xml.attributes['incremental'] == '1')
278
285
  schedule.repeater_type = xml.attributes['repeaterType'] if xml.attributes['repeaterType']
279
286
  schedule.is_extended = xml.attributes['is_extended'] if xml.attributes['is_extended']
280
287
  schedule.hour = xml.attributes['hour'] if xml.attributes['hour']
@@ -26,7 +26,7 @@ module Nexpose
26
26
  'cmd' => 'backup',
27
27
  'platform_independent' => platform_independent,
28
28
  'targetTask' => 'backupRestore' }
29
- xml = AJAX.form_post(self, '/data/maintenance/command', parameters)
29
+ xml = AJAX.form_post(self, '/admin/global/maintenance/maintCmd.txml', parameters)
30
30
  if !!(xml =~ /succeded="true"/)
31
31
  _maintenance_restart
32
32
  end
@@ -51,7 +51,7 @@ module Nexpose
51
51
  parameters['cleanup'] = 1 if clean_up
52
52
  parameters['compress'] = 1 if compress
53
53
  parameters['reindex'] = 1 if reindex
54
- xml = AJAX.form_post(self, '/data/maintenance/command', parameters)
54
+ xml = AJAX.form_post(self, '/admin/global/maintenance/maintCmd.txml', parameters)
55
55
  if !!(xml =~ /succeded="true"/)
56
56
  _maintenance_restart
57
57
  end
@@ -61,7 +61,7 @@ module Nexpose
61
61
  parameters = { 'cancelAllTasks' => false,
62
62
  'cmd' => 'restartServer',
63
63
  'targetTask' => 'maintModeHandler' }
64
- xml = AJAX.form_post(self, '/data/maintenanceMode/command', parameters)
64
+ xml = AJAX.form_post(self, '/admin/global/maintenance/maintCmd.txml', parameters)
65
65
  !!(xml =~ /succeded="true"/)
66
66
  end
67
67
  end
@@ -103,7 +103,7 @@ module Nexpose
103
103
  parameters = { 'backupid' => @name,
104
104
  'cmd' => 'restore',
105
105
  'targetTask' => 'backupRestore' }
106
- xml = AJAX.form_post(nsc, '/data/maintenance/command', parameters)
106
+ xml = AJAX.form_post(nsc, '/admin/global/maintenance/maintCmd.txml', parameters)
107
107
  if !!(xml =~ /succeded="true"/)
108
108
  nsc._maintenance_restart
109
109
  end
@@ -118,7 +118,7 @@ module Nexpose
118
118
  parameters = { 'backupid' => @name,
119
119
  'cmd' => 'deleteBackup',
120
120
  'targetTask' => 'backupRestore' }
121
- xml = AJAX.form_post(nsc, '/data/maintenance/command', parameters)
121
+ xml = AJAX.form_post(nsc, '/admin/global/maintenance/maintCmd.txml', parameters)
122
122
  !!(xml =~ /succeded="true"/)
123
123
  end
124
124
 
@@ -10,7 +10,7 @@ module Nexpose
10
10
  attr_accessor :schedule_type
11
11
  # The repeat interval based upon type.
12
12
  attr_accessor :schedule_interval
13
- # The earliest date to generate the report on (in ISO 8601 format).
13
+ # Starting time of the backup task (in unix epoch with milliseconds. Example: 1464956590000)
14
14
  attr_accessor :schedule_start
15
15
  # The description of the backup. Defaults to nil if not set
16
16
  attr_accessor :description
@@ -10,7 +10,7 @@ module Nexpose
10
10
  attr_accessor :schedule_type
11
11
  # The repeat interval based upon type.
12
12
  attr_accessor :schedule_interval
13
- # The earliest date to generate the report on (in ISO 8601 format).
13
+ # Starting time of the maintenance task (in unix epoch with milliseconds. Example: 1464956590000)
14
14
  attr_accessor :schedule_start
15
15
  # Whether the reindex task should run. Defaults to true if not set
16
16
  attr_accessor :reindex
@@ -1,4 +1,4 @@
1
1
  module Nexpose
2
2
  # The latest version of the Nexpose gem
3
- VERSION = '4.0.5'
3
+ VERSION = '5.0.0'
4
4
  end
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: 4.0.5
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - HD Moore
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2016-06-02 00:00:00.000000000 Z
16
+ date: 2016-06-23 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler
@@ -214,9 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  version: '0'
215
215
  requirements: []
216
216
  rubyforge_project:
217
- rubygems_version: 2.4.6
217
+ rubygems_version: 2.4.5.1
218
218
  signing_key:
219
219
  specification_version: 4
220
220
  summary: Ruby API for Rapid7 Nexpose
221
221
  test_files: []
222
- has_rdoc: