nexpose 3.3.1 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/nexpose/ajax.rb +10 -11
- data/lib/nexpose/util.rb +1 -1
- data/lib/nexpose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff0a541a3881e177817bd44ffd71e0372d327c53
|
4
|
+
data.tar.gz: 810e7389172b58708ac6569e94c83dcb08ffc73d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7553f4f8723d41cc0e19a19bf81e1ae0dc1041e1ef1c87729c1c14408992351c3c45ea449c311872bd06896f4d9eb2e04d4f8d003a590d37e59661a797788a7
|
7
|
+
data.tar.gz: 533a132b22a6cf35ae454690ece01e0ef6bb87ccfecb677b791645a10ff6aa0deb80d5d02d687d1f0754976a272dab4f824b9467c3ff0f311e10663963cfbe49
|
data/Gemfile.lock
CHANGED
data/lib/nexpose/ajax.rb
CHANGED
@@ -245,11 +245,12 @@ module Nexpose
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def get_rows(nsc, pref)
|
248
|
-
uri = '/
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
248
|
+
uri = '/data/user/preferences/all'
|
249
|
+
pref_key = "#{pref}.rows"
|
250
|
+
resp = get(nsc, uri)
|
251
|
+
json = JSON.parse(resp)
|
252
|
+
if json.has_key?(pref_key)
|
253
|
+
rows = json[pref_key].to_i
|
253
254
|
rows > 0 ? rows : 10
|
254
255
|
else
|
255
256
|
10
|
@@ -257,14 +258,12 @@ module Nexpose
|
|
257
258
|
end
|
258
259
|
|
259
260
|
def set_rows(nsc, pref, value)
|
260
|
-
uri = '/
|
261
|
+
uri = '/data/user/preference'
|
261
262
|
params = { 'name' => "#{pref}.rows",
|
262
263
|
'value' => value }
|
263
|
-
|
264
|
-
|
265
|
-
if attr = REXML::XPath.first(xml, 'SetUserPref/@success')
|
266
|
-
attr.value == '1'
|
267
|
-
end
|
264
|
+
|
265
|
+
form_post(nsc, uri, params)
|
268
266
|
end
|
267
|
+
|
269
268
|
end
|
270
269
|
end
|
data/lib/nexpose/util.rb
CHANGED
@@ -50,7 +50,7 @@ module Nexpose
|
|
50
50
|
# @return [IPRange|HostName] Valid class, if it can be converted.
|
51
51
|
#
|
52
52
|
def convert(asset)
|
53
|
-
ips = asset.split('
|
53
|
+
ips = asset.split('-').map(&:strip)
|
54
54
|
IPAddr.new(ips[0])
|
55
55
|
IPAddr.new(ips[1]) if ips[1]
|
56
56
|
IPRange.new(ips[0], ips[1])
|
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: 3.3.
|
4
|
+
version: 3.3.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: 2016-04-
|
16
|
+
date: 2016-04-29 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: bundler
|