nexpose 2.1.1 → 2.1.2

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: 6135181a3541c32569d8ea7606ba0685dd5fa3c7
4
- data.tar.gz: 494ff896cb0366bd74b3470414c223d21d1e13a4
3
+ metadata.gz: 161b944a082768d9102ec7c45afacbfdf3c4dbb1
4
+ data.tar.gz: df523fb6199f21054243e822a22327fd0f3b918a
5
5
  SHA512:
6
- metadata.gz: 61168a8c11c370094a44b55c96b52a2009150abeca7b0ca83fb75da0beec11f72f2e8ce864f139a34397913f1cc661745dd1fe4d40f01dea22f342dc8d3de122
7
- data.tar.gz: d3e0177cdd6aa5db81dd299657fca8dfe863908f99b2c87455cdd3824ead7dd1d18d1b6dfb6dde6794a6df27cfb63679bdaf0cd03e7fc630e16d5159c6c14d13
6
+ metadata.gz: 2b1767c2fc29adac23c5344faf09af8235bc0ca7c385bede5b827e0dab1de3f78b283f919737876725ad5355eda3804c20da8087792fc2177277480901c2be70
7
+ data.tar.gz: 1e21d09c63ee7f1732b81d40cc33eb0e5155fcf3f707b7009be7c41fdd93cdc4cb852d5860674d9250dda5ac5eaf83037e2ade521c2cca0268b0c979d86408ba
data/lib/nexpose/scan.rb CHANGED
@@ -407,9 +407,10 @@ module Nexpose
407
407
  data = Rex::MIME::Message.new
408
408
  data.add_part(site_id.to_s, nil, nil, 'form-data; name="siteid"')
409
409
  data.add_part(session_id, nil, nil, 'form-data; name="nexposeCCSessionID"')
410
- scan = ::File.new(zip_file, 'rb')
411
- data.add_part(scan.read, 'application/zip', 'binary',
412
- "form-data; name=\"scan\"; filename=\"#{zip_file}\"")
410
+ ::File.open(zip_file, 'rb') do |scan|
411
+ data.add_part(scan.read, 'application/zip', 'binary',
412
+ "form-data; name=\"scan\"; filename=\"#{zip_file}\"")
413
+ end
413
414
 
414
415
  post = Net::HTTP::Post.new('/data/scan/import')
415
416
  post.body = data.to_s
@@ -514,7 +514,7 @@ module Nexpose
514
514
  response = JSON.parse(AJAX.get(nsc, "/data/scan/templates/#{URI.encode(id)}"))
515
515
  xml = response['value']
516
516
  else
517
- xml = AJAX.get(nsc, '/ajax/scantemplate_config.txml')
517
+ xml = AJAX.get(nsc, '/data/scan-template')
518
518
  end
519
519
  new(xml)
520
520
  end
@@ -1,4 +1,4 @@
1
1
  module Nexpose
2
2
  # The latest version of the Nexpose gem
3
- VERSION = '2.1.1'
3
+ VERSION = '2.1.2'
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: 2.1.1
4
+ version: 2.1.2
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: 2015-10-21 00:00:00.000000000 Z
16
+ date: 2015-11-04 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rex