metasploit_data_models 0.19.8 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/mdm/host.rb +2 -0
- data/app/models/mdm/workspace.rb +5 -5
- data/app/models/metasploit_data_models/ip_address/v4/cidr.rb +3 -1
- data/app/models/metasploit_data_models/ip_address/v4/range.rb +3 -1
- data/app/models/metasploit_data_models/ip_address/v4/segment/nmap/list.rb +3 -2
- data/lib/metasploit_data_models.rb +2 -12
- data/lib/metasploit_data_models/ip_address/cidr.rb +3 -1
- data/lib/metasploit_data_models/match.rb +2 -0
- data/lib/metasploit_data_models/match/child.rb +2 -1
- data/lib/metasploit_data_models/match/parent.rb +3 -1
- data/lib/metasploit_data_models/version.rb +2 -2
- data/metasploit_data_models.gemspec +7 -6
- metadata +21 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Nzk1ZmI5MWMxZTNiMjI5NTMwN2YzMzY3NzI4YmRiNzdkNmU3NDZjMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzczNWRiNzQ1YjBmNmJlMjIzOTFkNmZiOTJkMjIwZTA3NDg3YjVjYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjI5NzJhZTY3ZjUyODg4N2E0MTBkMWI2YzVmNjA5ZGEwNTc1Y2Y0NmEzNWNk
|
10
|
+
MWZjMTg5ZTgyMDFiZmFiMmNmM2Q0NjhjYmZmNjZjODI0NzNmNWUzZDRjMzMx
|
11
|
+
ZGFlMjM4YzUxYzQ4YTc1MjJlODQ3NDA1NTUyMzZmYzkxYWY0NDM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTZiY2U5MWNhMWQyMzE2MDkwOWI5MDE0MDNlMzhmMGYzMjY5Y2E0NDFhOTk0
|
14
|
+
ODkxZjIyMzk4YzRhM2JlN2ZmMGQ3M2YxZTg5NzQyYjdhMmVlM2JjZjhlMjZk
|
15
|
+
MGY0YzliZDUxZGNhZTZjZjE2ZjBiZTIyMDBlM2E4OTVjZGQ3M2Q=
|
data/app/models/mdm/host.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# A system with an {#address IP address} on the network that has been discovered in some way.
|
2
2
|
class Mdm::Host < ActiveRecord::Base
|
3
|
+
require 'mdm/host/operating_system_normalization'
|
4
|
+
|
3
5
|
include Mdm::Host::OperatingSystemNormalization
|
4
6
|
include Metasploit::Model::Search
|
5
7
|
|
data/app/models/mdm/workspace.rb
CHANGED
@@ -156,11 +156,11 @@ class Mdm::Workspace < ActiveRecord::Base
|
|
156
156
|
|
157
157
|
def unique_web_forms
|
158
158
|
query = <<-EOQ
|
159
|
-
SELECT DISTINCT web_forms.web_site_id, web_forms.path, web_forms.method, web_forms.query
|
160
|
-
FROM hosts, services, web_sites, web_forms
|
161
|
-
WHERE hosts.workspace_id = #{id} AND
|
162
|
-
services.host_id = hosts.id AND
|
163
|
-
web_sites.service_id = services.id AND
|
159
|
+
SELECT DISTINCT web_forms.web_site_id, web_forms.path, web_forms.method, web_forms.query
|
160
|
+
FROM hosts, services, web_sites, web_forms
|
161
|
+
WHERE hosts.workspace_id = #{id} AND
|
162
|
+
services.host_id = hosts.id AND
|
163
|
+
web_sites.service_id = services.id AND
|
164
164
|
web_forms.web_site_id = web_sites.id
|
165
165
|
EOQ
|
166
166
|
Mdm::WebForm.find_by_sql(query)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit_data_models/ip_address/cidr'
|
2
|
+
|
1
3
|
# An IPv4 CIDR (Classless InterDomain Routing) block composed of a
|
2
4
|
# {MetasploitDataModels::IPAddress::V4::Single IPv4} {MetasploitDataModels::IPAddress::CIDR#address address} and
|
3
5
|
# {MetasploitDataModels::IPAddress::CIDR#prefix_length prefix_length} written in the form `'a.b.c.d/prefix_length'`.
|
@@ -11,4 +13,4 @@ class MetasploitDataModels::IPAddress::V4::CIDR < Metasploit::Model::Base
|
|
11
13
|
#
|
12
14
|
|
13
15
|
cidr address_class: MetasploitDataModels::IPAddress::V4::Single
|
14
|
-
end
|
16
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit_data_models/ip_address/range'
|
2
|
+
|
1
3
|
# A range of complete IPv4 addresses, separated by a `-`.
|
2
4
|
class MetasploitDataModels::IPAddress::V4::Range < Metasploit::Model::Base
|
3
5
|
extend MetasploitDataModels::Match::Child
|
@@ -9,4 +11,4 @@ class MetasploitDataModels::IPAddress::V4::Range < Metasploit::Model::Base
|
|
9
11
|
#
|
10
12
|
|
11
13
|
extremes class_name: 'MetasploitDataModels::IPAddress::V4::Single'
|
12
|
-
end
|
14
|
+
end
|
@@ -1,8 +1,9 @@
|
|
1
|
+
require 'metasploit_data_models/match/parent'
|
2
|
+
|
1
3
|
# A comma separated list of {MetasploitDataModels::IPAddress::V4::Segment::Single segment numbers} and
|
2
4
|
# {MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range range of segment numbers} making up one segment of
|
3
5
|
# {MetasploitDataModels::IPAddress::V4::Nmap}.
|
4
6
|
class MetasploitDataModels::IPAddress::V4::Segment::Nmap::List < Metasploit::Model::Base
|
5
|
-
extend ActiveSupport::Autoload
|
6
7
|
|
7
8
|
include MetasploitDataModels::Match::Parent
|
8
9
|
|
@@ -123,4 +124,4 @@ class MetasploitDataModels::IPAddress::V4::Segment::Nmap::List < Metasploit::Mod
|
|
123
124
|
errors.add(:value, :array)
|
124
125
|
end
|
125
126
|
end
|
126
|
-
end
|
127
|
+
end
|
@@ -24,13 +24,9 @@ require 'arel-helpers'
|
|
24
24
|
require 'mdm'
|
25
25
|
require 'mdm/module'
|
26
26
|
require 'metasploit_data_models/base64_serializer'
|
27
|
-
require 'metasploit_data_models/
|
27
|
+
require 'metasploit_data_models/engine'
|
28
28
|
require 'metasploit_data_models/serialized_prefs'
|
29
|
-
|
30
|
-
# Only include the Rails engine when using Rails.
|
31
|
-
if defined? Rails
|
32
|
-
require 'metasploit_data_models/engine'
|
33
|
-
end
|
29
|
+
require 'metasploit_data_models/version'
|
34
30
|
|
35
31
|
module MetasploitDataModels
|
36
32
|
def self.root
|
@@ -44,9 +40,3 @@ module MetasploitDataModels
|
|
44
40
|
end
|
45
41
|
end
|
46
42
|
|
47
|
-
lib_pathname = MetasploitDataModels.root.join('lib')
|
48
|
-
# has to work under 1.8.7, so can't use to_path
|
49
|
-
lib_path = lib_pathname.to_s
|
50
|
-
# Add path to gem's lib so that concerns for models are loaded correctly if models are reloaded
|
51
|
-
ActiveSupport::Dependencies.autoload_paths << lib_path
|
52
|
-
ActiveSupport::Dependencies.autoload_once_paths << lib_path
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit_data_models/match/child'
|
2
|
+
|
1
3
|
# Common behavior for Class-InterDomain Routing (`<address>/<prefix-length>`) notation under
|
2
4
|
# {MetasploitDataModels::IPAddress},
|
3
5
|
module MetasploitDataModels::IPAddress::CIDR
|
@@ -171,4 +173,4 @@ module MetasploitDataModels::IPAddress::CIDR
|
|
171
173
|
errors.add(:address, :invalid)
|
172
174
|
end
|
173
175
|
end
|
174
|
-
end
|
176
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'metasploit_data_models/match'
|
1
2
|
# Adds a {#match match class method} to the extending class. The extending class must define `MATCH_REGEXP`.
|
2
3
|
#
|
3
4
|
# @example Define `match` class method
|
@@ -45,4 +46,4 @@ module MetasploitDataModels::Match::Child
|
|
45
46
|
def regexp
|
46
47
|
self::REGEXP
|
47
48
|
end
|
48
|
-
end
|
49
|
+
end
|
@@ -4,9 +4,9 @@ module MetasploitDataModels
|
|
4
4
|
# The major version number.
|
5
5
|
MAJOR = 0
|
6
6
|
# The minor version number, scoped to the {MAJOR} version number.
|
7
|
-
MINOR =
|
7
|
+
MINOR = 20
|
8
8
|
# The patch number, scoped to the {MINOR} version number.
|
9
|
-
PATCH =
|
9
|
+
PATCH = 0
|
10
10
|
|
11
11
|
# The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the `PRERELEASE` in the
|
12
12
|
# {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
|
@@ -39,26 +39,27 @@ Gem::Specification.new do |s|
|
|
39
39
|
# @see MSP-2971
|
40
40
|
s.add_runtime_dependency 'activerecord', '>= 3.2.13', '< 4.0.0'
|
41
41
|
s.add_runtime_dependency 'activesupport'
|
42
|
-
s.add_runtime_dependency 'metasploit-concern', '~> 0.1
|
43
|
-
s.add_runtime_dependency 'metasploit-model', '~> 0.
|
44
|
-
|
42
|
+
s.add_runtime_dependency 'metasploit-concern', '~> 0.2.1'
|
43
|
+
s.add_runtime_dependency 'metasploit-model', '~> 0.27.0'
|
44
|
+
s.add_runtime_dependency 'railties', '< 4.0.0'
|
45
|
+
|
45
46
|
# arel-helpers: Useful tools to help construct database queries with ActiveRecord and Arel.
|
46
47
|
s.add_runtime_dependency 'arel-helpers'
|
47
|
-
|
48
|
+
|
48
49
|
if RUBY_PLATFORM =~ /java/
|
49
50
|
# markdown formatting for yard
|
50
51
|
s.add_development_dependency 'kramdown'
|
51
52
|
|
52
53
|
s.add_runtime_dependency 'jdbc-postgres'
|
53
54
|
s.add_runtime_dependency 'activerecord-jdbcpostgresql-adapter'
|
54
|
-
|
55
|
+
|
55
56
|
s.platform = Gem::Platform::JAVA
|
56
57
|
else
|
57
58
|
# markdown formatting for yard
|
58
59
|
s.add_development_dependency 'redcarpet'
|
59
60
|
|
60
61
|
s.add_runtime_dependency 'pg'
|
61
|
-
|
62
|
+
|
62
63
|
s.platform = Gem::Platform::RUBY
|
63
64
|
end
|
64
65
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit_data_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Huckins
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-09-
|
14
|
+
date: 2014-09-17 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake
|
@@ -95,28 +95,42 @@ dependencies:
|
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.1
|
98
|
+
version: 0.2.1
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
101
|
version_requirements: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - ~>
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.1
|
105
|
+
version: 0.2.1
|
106
106
|
- !ruby/object:Gem::Dependency
|
107
107
|
name: metasploit-model
|
108
108
|
requirement: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - ~>
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.
|
112
|
+
version: 0.27.0
|
113
113
|
type: :runtime
|
114
114
|
prerelease: false
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - ~>
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.
|
119
|
+
version: 0.27.0
|
120
|
+
- !ruby/object:Gem::Dependency
|
121
|
+
name: railties
|
122
|
+
requirement: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - <
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 4.0.0
|
127
|
+
type: :runtime
|
128
|
+
prerelease: false
|
129
|
+
version_requirements: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - <
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 4.0.0
|
120
134
|
- !ruby/object:Gem::Dependency
|
121
135
|
name: arel-helpers
|
122
136
|
requirement: !ruby/object:Gem::Requirement
|
@@ -375,6 +389,7 @@ files:
|
|
375
389
|
- lib/metasploit_data_models/ip_address.rb
|
376
390
|
- lib/metasploit_data_models/ip_address/cidr.rb
|
377
391
|
- lib/metasploit_data_models/ip_address/range.rb
|
392
|
+
- lib/metasploit_data_models/match.rb
|
378
393
|
- lib/metasploit_data_models/match/child.rb
|
379
394
|
- lib/metasploit_data_models/match/parent.rb
|
380
395
|
- lib/metasploit_data_models/search.rb
|