nexpose 0.2.3 → 0.2.4
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/lib/nexpose/role.rb +8 -0
- data/lib/nexpose/tags +8 -8
- data/lib/nexpose/user.rb +3 -3
- 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: 99af3c0c74693a9df896c50271778eb81ba30347
|
4
|
+
data.tar.gz: 6545d6a48af4804641464b9664e66b4ccd9c4874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0604a979b91e03b8d213fe29608a193228b633e679916480996b8e92d2cb1aeacaccd685c84a4b4d0380c9e0c796571827e48884807adadea521fa21ac7b8892
|
7
|
+
data.tar.gz: 07bd389940f0ecf8d94442a5c388e79db2f3259c3f92c1d60c648cb2a6d2a398686b6a325c9b8eb2867909fe6cd4966215f6b9160a85be0d26d1f4b16c87ceb5
|
data/lib/nexpose/role.rb
CHANGED
@@ -113,6 +113,14 @@ module Nexpose
|
|
113
113
|
|
114
114
|
class Role < RoleSummary
|
115
115
|
|
116
|
+
# Constants, mapping UI terms to role names expected by API.
|
117
|
+
|
118
|
+
GLOBAL_ADMINISTRATOR = 'global-admin'
|
119
|
+
ASSET_OWNER = 'system-admin'
|
120
|
+
SECURITY_MANAGER = 'security-manager'
|
121
|
+
SITE_ADMINISTRATOR = 'site-admin'
|
122
|
+
USER = 'user'
|
123
|
+
|
116
124
|
# Array of all privileges which are enabled for this role.
|
117
125
|
# Note: Although the underlying XML has different requirements, this only checks for presence.
|
118
126
|
# @see Nexpose::Privilege
|
data/lib/nexpose/tags
CHANGED
@@ -97,8 +97,8 @@ SyslogAlert alert.rb /^ class SyslogAlert$/;" c
|
|
97
97
|
Tasks scan.rb /^ class Tasks$/;" c class:Nexpose.ScanSummary
|
98
98
|
Ticket ticket.rb /^ module Ticket$/;" m class:Nexpose
|
99
99
|
TicketSummary ticket.rb /^ class TicketSummary$/;" c class:Nexpose
|
100
|
+
User user.rb /^ class User$/;" c class:Nexpose
|
100
101
|
UserAuthenticator user.rb /^ class UserAuthenticator$/;" c class:Nexpose
|
101
|
-
UserConfig user.rb /^ class UserConfig$/;" c class:Nexpose
|
102
102
|
UserSummary user.rb /^ class UserSummary$/;" c class:Nexpose
|
103
103
|
VulnFilter alert.rb /^ class VulnFilter$/;" c
|
104
104
|
Vulnerabilities scan.rb /^ class Vulnerabilities$/;" c class:Nexpose.ScanSummary
|
@@ -137,8 +137,8 @@ delete role.rb /^ def delete(nsc)$/;" f class:Nexpose.Role
|
|
137
137
|
delete scan_engine.rb /^ def delete$/;" f class:Nexpose.EngineConfig
|
138
138
|
delete scan_engine.rb /^ def delete(connection)$/;" f class:Nexpose.EnginePool
|
139
139
|
delete site.rb /^ def delete(connection)$/;" f class:Site
|
140
|
-
delete user.rb /^ def delete(connection)$/;" f class:Nexpose.
|
141
|
-
delete user.rb /^ def self.delete(connection, user_id)$/;" F class:Nexpose.
|
140
|
+
delete user.rb /^ def delete(connection)$/;" f class:Nexpose.User
|
141
|
+
delete user.rb /^ def self.delete(connection, user_id)$/;" F class:Nexpose.User
|
142
142
|
delete_engine scan_engine.rb /^ def delete_engine(engine_id)$/;" f class:Nexpose.NexposeAPI
|
143
143
|
delete_mtu silo.rb /^ def delete_mtu user_name, user_id$/;" f class:Nexpose
|
144
144
|
delete_report report.rb /^ def delete_report(report_id)$/;" f class:Nexpose.NexposeAPI
|
@@ -220,7 +220,7 @@ initialize site.rb /^ def initialize(name = nil, scan_template = 'full-audit'
|
|
220
220
|
initialize ticket.rb /^ def initialize(id, name)$/;" f class:Nexpose.TicketSummary
|
221
221
|
initialize user.rb /^ def initialize(id, auth_module, auth_source, external = false)$/;" f class:Nexpose.UserAuthenticator
|
222
222
|
initialize user.rb /^ def initialize(id, auth_source, auth_module, user_name, full_name, email, is_admin, is_disabled, is_locked, site_count, group_count)$/;" f class:Nexpose.UserSummary
|
223
|
-
initialize user.rb /^ def initialize(name, full_name, password, role_name = 'user', id = -1, enabled = 1, email = nil, all_sites = false, all_groups = false)$/;" f class:Nexpose.
|
223
|
+
initialize user.rb /^ def initialize(name, full_name, password, role_name = 'user', id = -1, enabled = 1, email = nil, all_sites = false, all_groups = false)$/;" f class:Nexpose.User
|
224
224
|
initialize vuln.rb /^ def initialize(id, title, severity)$/;" f class:Nexpose.Vulnerability
|
225
225
|
initialize vuln.rb /^ def initialize(id, title, severity)$/;" f class:Nexpose.VulnerabilityDetail
|
226
226
|
initialize vuln.rb /^ def initialize(source, reference)$/;" f class:Nexpose.Reference
|
@@ -239,7 +239,7 @@ load report.rb /^ def self.load(connection, report_config_id)$/;" F class:Nex
|
|
239
239
|
load report.rb /^ def self.load(connection, template_id)$/;" F class:Nexpose.ReportTemplate
|
240
240
|
load role.rb /^ def self.load(nsc, name, scope = Scope::SILO)$/;" F class:Nexpose.Role
|
241
241
|
load site.rb /^ def self.load(connection, id)$/;" F class:Site
|
242
|
-
load user.rb /^ def self.load(connection, user_id)$/;" F class:Nexpose.
|
242
|
+
load user.rb /^ def self.load(connection, user_id)$/;" F class:Nexpose.User
|
243
243
|
load_details scan_engine.rb /^ def load_details(connection)$/;" f class:Nexpose.EnginePool
|
244
244
|
login connection.rb /^ def login$/;" f class:Nexpose.Connection
|
245
245
|
logout connection.rb /^ def logout$/;" f class:Nexpose.Connection
|
@@ -293,7 +293,7 @@ save report.rb /^ def save(connection, generate_now = false)$/;" f class:Nexp
|
|
293
293
|
save role.rb /^ def save(nsc)$/;" f class:Nexpose.Role
|
294
294
|
save scan_engine.rb /^ def save$/;" f class:Nexpose.EngineConfig
|
295
295
|
save site.rb /^ def save(connection)$/;" f class:Site
|
296
|
-
save user.rb /^ def save(connection)$/;" f class:Nexpose.
|
296
|
+
save user.rb /^ def save(connection)$/;" f class:Nexpose.User
|
297
297
|
scan site.rb /^ def scan(connection, sync_id = nil)$/;" f class:Site
|
298
298
|
scan_activity scan.rb /^ def scan_activity$/;" f class:Nexpose.NexposeAPI
|
299
299
|
scan_pause scan.rb /^ def scan_pause(scan_id)$/;" f class:Nexpose.NexposeAPI
|
@@ -320,7 +320,7 @@ ticket_listing ticket.rb /^ def ticket_listing$/;" f class:Nexpose.NexposeAPI
|
|
320
320
|
to_s error.rb /^ def to_s$/;" f class:Nexpose.APIError
|
321
321
|
to_s scan_engine.rb /^ def to_s$/;" f class:Nexpose.EnginePool
|
322
322
|
to_s scan_engine.rb /^ def to_s$/;" f class:Nexpose.EnginePoolSummary
|
323
|
-
to_s user.rb /^ def to_s$/;" f class:Nexpose.
|
323
|
+
to_s user.rb /^ def to_s$/;" f class:Nexpose.User
|
324
324
|
to_s user.rb /^ def to_s$/;" f class:Nexpose.UserSummary
|
325
325
|
to_xml alert.rb /^ def to_xml$/;" f class:Nexpose.Alert
|
326
326
|
to_xml alert.rb /^ def to_xml$/;" f class:SMTPAlert
|
@@ -346,7 +346,7 @@ to_xml scan_engine.rb /^ def to_xml$/;" f class:Nexpose.EngineConfig
|
|
346
346
|
to_xml site.rb /^ def to_xml$/;" f class:HostName
|
347
347
|
to_xml site.rb /^ def to_xml$/;" f class:IPRange
|
348
348
|
to_xml site.rb /^ def to_xml$/;" f class:Site
|
349
|
-
to_xml user.rb /^ def to_xml$/;" f class:Nexpose.
|
349
|
+
to_xml user.rb /^ def to_xml$/;" f class:Nexpose.User
|
350
350
|
to_xml_elem creds.rb /^ def to_xml_elem$/;" f class:Nexpose.AdminCredentials
|
351
351
|
to_xml_elem creds.rb /^ def to_xml_elem$/;" f class:Nexpose.Field
|
352
352
|
to_xml_elem creds.rb /^ def to_xml_elem$/;" f class:Nexpose.HTMLForm
|
data/lib/nexpose/user.rb
CHANGED
@@ -68,7 +68,7 @@ module Nexpose
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
class
|
71
|
+
class User
|
72
72
|
include Sanitize
|
73
73
|
|
74
74
|
# user id, set to -1 to create a new user
|
@@ -172,7 +172,7 @@ module Nexpose
|
|
172
172
|
all_groups = config.attributes['allGroups'] == 'true' ? true : false
|
173
173
|
# Not trying to load sites and groups.
|
174
174
|
# Looks like API currently doesn't return that info to load.
|
175
|
-
return
|
175
|
+
return User.new(name, fullname, password, role_name, id, enabled, email, all_sites, all_groups)
|
176
176
|
end
|
177
177
|
end
|
178
178
|
end
|
@@ -192,7 +192,7 @@ module Nexpose
|
|
192
192
|
|
193
193
|
# Delete the user account associated with this object.
|
194
194
|
def delete(connection)
|
195
|
-
|
195
|
+
User.delete(connection, @id)
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
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.4
|
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-05-
|
13
|
+
date: 2013-05-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: librex
|