nexpose 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nexpose/error.rb +7 -0
- data/lib/nexpose/group.rb +0 -1
- data/lib/nexpose/manage.rb +10 -14
- data/lib/nexpose/site.rb +4 -4
- data/lib/nexpose/ticket.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50b3a4ea395acfdb69e8cc0293d403b9cd53eccc
|
4
|
+
data.tar.gz: b9e88228bbb4ff2b6a77718654f73582284328c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc964a92ba088913a9e17b9c037282faaa545bd2cce65ef42f6bda1191b5fd4bc72872bccd1f225d6a2cef6fb3835fbe44c00a4bf6fe1d10b373bd7c26c8e03b
|
7
|
+
data.tar.gz: 3eca493933ccd66545cc95684d48d57fe9cd7251eaa1794cdec5a642d13ebccd2e40a9af678929656c39adda898b579672de00ad28077166c681101684187b3b
|
data/lib/nexpose/error.rb
CHANGED
data/lib/nexpose/group.rb
CHANGED
data/lib/nexpose/manage.rb
CHANGED
@@ -56,27 +56,23 @@ module Nexpose
|
|
56
56
|
execute(make_xml('RestartRequest', {})).success
|
57
57
|
end
|
58
58
|
|
59
|
-
# --
|
60
|
-
# TODO This is not yet implemented correctly.
|
61
|
-
#
|
62
59
|
# Output diagnostic information into log files, zip the files, and encrypt
|
63
60
|
# the archive with a PGP public key that is provided as a parameter for the
|
64
|
-
# API call. Then
|
65
|
-
#
|
66
|
-
# to a URL that is specified as an API parameter.
|
61
|
+
# API call. Then upload the archive using HTTPS to a URL that is specified
|
62
|
+
# as an API parameter.
|
67
63
|
#
|
68
|
-
#
|
64
|
+
# @param url Upload server to send the support log package to.
|
69
65
|
#
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
xml = make_xml('ConsoleCommandRequest', {'keyid' => key_id})
|
66
|
+
def send_log(uri = 'https://support.rapid7.com')
|
67
|
+
url = REXML::Element.new('URL')
|
68
|
+
url.text = uri
|
74
69
|
tpt = REXML::Element.new('Transport')
|
75
|
-
tpt.add_attribute('protocol',
|
76
|
-
tpt
|
70
|
+
tpt.add_attribute('protocol', 'https')
|
71
|
+
tpt << url
|
72
|
+
xml = make_xml('SendLogRequest')
|
77
73
|
xml << tpt
|
78
74
|
|
79
|
-
|
75
|
+
execute(xml).success
|
80
76
|
end
|
81
77
|
end
|
82
78
|
end
|
data/lib/nexpose/site.rb
CHANGED
@@ -523,11 +523,11 @@ module Nexpose
|
|
523
523
|
attr_reader :site_id
|
524
524
|
|
525
525
|
def initialize(id, address, site_id, risk_factor = 1.0, risk_score = 0.0)
|
526
|
-
@id = id
|
526
|
+
@id = id.to_i
|
527
527
|
@address = address
|
528
|
-
@site_id = site_id
|
529
|
-
@risk_factor = risk_factor
|
530
|
-
@risk_score = risk_score
|
528
|
+
@site_id = site_id.to_i
|
529
|
+
@risk_factor = risk_factor.to_f
|
530
|
+
@risk_score = risk_score.to_f
|
531
531
|
end
|
532
532
|
end
|
533
533
|
|
data/lib/nexpose/ticket.rb
CHANGED
@@ -123,7 +123,7 @@ module Nexpose
|
|
123
123
|
# Add vulnerabilities
|
124
124
|
vulnerabilities_xml = REXML::Element.new 'Vulnerabilities'
|
125
125
|
vulnerabilities.each do |vuln_id|
|
126
|
-
vulnerabilities_xml.add_element 'Vulnerability', {'id' => vuln_id}
|
126
|
+
vulnerabilities_xml.add_element 'Vulnerability', {'id' => vuln_id.downcase}
|
127
127
|
end
|
128
128
|
create_request_xml.add_element vulnerabilities_xml
|
129
129
|
|
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.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HD Moore
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-06-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: librex
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.0.
|
98
|
+
rubygems_version: 2.0.0.rc.2
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: Ruby API for Rapid7 Nexpose
|