metasploit-model 0.27.0.pre.dep.pre.railties → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/app/models/metasploit/model/association/reflection.rb +3 -0
- data/app/models/metasploit/model/module/ancestor/spec/template.rb +3 -0
- data/app/models/metasploit/model/module/class/spec/template.rb +4 -0
- data/app/models/metasploit/model/module/instance/spec/template.rb +4 -0
- data/app/models/metasploit/model/search/group/base.rb +3 -0
- data/app/models/metasploit/model/search/group/intersection.rb +2 -0
- data/app/models/metasploit/model/search/group/union.rb +2 -0
- data/app/models/metasploit/model/search/operation/association.rb +2 -0
- data/app/models/metasploit/model/search/operation/base.rb +3 -0
- data/app/models/metasploit/model/search/operation/boolean.rb +2 -0
- data/app/models/metasploit/model/search/operation/date.rb +2 -0
- data/app/models/metasploit/model/search/operation/group/base.rb +2 -0
- data/app/models/metasploit/model/search/operation/group/intersection.rb +2 -0
- data/app/models/metasploit/model/search/operation/group/union.rb +2 -0
- data/app/models/metasploit/model/search/operation/integer.rb +4 -0
- data/app/models/metasploit/model/search/operation/null.rb +2 -0
- data/app/models/metasploit/model/search/operation/set.rb +2 -0
- data/app/models/metasploit/model/search/operation/set/integer.rb +2 -0
- data/app/models/metasploit/model/search/operation/set/string.rb +2 -0
- data/app/models/metasploit/model/search/operation/string.rb +4 -0
- data/app/models/metasploit/model/search/operator/association.rb +2 -0
- data/app/models/metasploit/model/search/operator/attribute.rb +2 -0
- data/app/models/metasploit/model/search/operator/base.rb +4 -0
- data/app/models/metasploit/model/search/operator/delegation.rb +2 -0
- data/app/models/metasploit/model/search/operator/deprecated/app.rb +2 -0
- data/app/models/metasploit/model/search/operator/deprecated/author.rb +2 -0
- data/app/models/metasploit/model/search/operator/deprecated/authority.rb +2 -0
- data/app/models/metasploit/model/search/operator/deprecated/platform.rb +2 -0
- data/app/models/metasploit/model/search/operator/deprecated/ref.rb +2 -0
- data/app/models/metasploit/model/search/operator/deprecated/text.rb +2 -0
- data/app/models/metasploit/model/search/operator/group/base.rb +2 -0
- data/app/models/metasploit/model/search/operator/group/intersection.rb +2 -0
- data/app/models/metasploit/model/search/operator/group/union.rb +2 -0
- data/app/models/metasploit/model/search/operator/null.rb +2 -0
- data/app/models/metasploit/model/search/operator/single.rb +2 -0
- data/app/models/metasploit/model/search/query.rb +3 -0
- data/app/models/metasploit/model/spec/template.rb +9 -2
- data/app/models/metasploit/model/visitation/visitor.rb +3 -0
- data/lib/metasploit/model.rb +24 -15
- data/lib/metasploit/model/architecture.rb +2 -0
- data/lib/metasploit/model/association.rb +4 -0
- data/lib/metasploit/model/author.rb +2 -0
- data/lib/metasploit/model/authority.rb +14 -0
- data/lib/metasploit/model/authority/bid.rb +2 -0
- data/lib/metasploit/model/authority/cve.rb +2 -0
- data/lib/metasploit/model/authority/msb.rb +2 -0
- data/lib/metasploit/model/authority/osvdb.rb +2 -0
- data/lib/metasploit/model/authority/pmasa.rb +2 -0
- data/lib/metasploit/model/authority/secunia.rb +2 -0
- data/lib/metasploit/model/authority/us_cert_vu.rb +2 -0
- data/lib/metasploit/model/authority/waraxe.rb +2 -0
- data/lib/metasploit/model/authority/zdi.rb +2 -0
- data/lib/metasploit/model/base.rb +2 -0
- data/lib/metasploit/model/derivation.rb +4 -1
- data/lib/metasploit/model/email_address.rb +2 -0
- data/lib/metasploit/model/engine.rb +1 -0
- data/lib/metasploit/model/invalid.rb +2 -0
- data/lib/metasploit/model/login.rb +10 -0
- data/lib/metasploit/model/login/status.rb +2 -0
- data/lib/metasploit/model/module.rb +16 -0
- data/lib/metasploit/model/module/action.rb +2 -0
- data/lib/metasploit/model/module/ancestor.rb +6 -0
- data/lib/metasploit/model/module/ancestor/spec.rb +5 -0
- data/lib/metasploit/model/module/architecture.rb +2 -0
- data/lib/metasploit/model/module/author.rb +2 -0
- data/lib/metasploit/model/module/class.rb +5 -0
- data/lib/metasploit/model/module/class/spec.rb +5 -0
- data/lib/metasploit/model/module/instance.rb +6 -0
- data/lib/metasploit/model/module/instance/spec.rb +5 -0
- data/lib/metasploit/model/module/path.rb +3 -0
- data/lib/metasploit/model/module/platform.rb +2 -0
- data/lib/metasploit/model/module/rank.rb +2 -0
- data/lib/metasploit/model/module/reference.rb +2 -0
- data/lib/metasploit/model/module/target.rb +6 -0
- data/lib/metasploit/model/module/target/architecture.rb +2 -0
- data/lib/metasploit/model/module/target/platform.rb +2 -0
- data/lib/metasploit/model/platform.rb +2 -0
- data/lib/metasploit/model/real_pathname.rb +2 -0
- data/lib/metasploit/model/realm.rb +9 -0
- data/lib/metasploit/model/realm/key.rb +2 -0
- data/lib/metasploit/model/reference.rb +2 -0
- data/lib/metasploit/model/search.rb +9 -0
- data/lib/metasploit/model/search/attribute.rb +2 -0
- data/lib/metasploit/model/search/group.rb +6 -0
- data/lib/metasploit/model/search/operation.rb +4 -0
- data/lib/metasploit/model/search/operation/group.rb +5 -0
- data/lib/metasploit/model/search/operator.rb +4 -0
- data/lib/metasploit/model/search/operator/deprecated.rb +6 -0
- data/lib/metasploit/model/search/operator/group.rb +5 -0
- data/lib/metasploit/model/spec.rb +7 -0
- data/lib/metasploit/model/spec/i18n_exception_handler.rb +2 -0
- data/lib/metasploit/model/spec/pathname_collision.rb +2 -0
- data/lib/metasploit/model/spec/template/write.rb +2 -0
- data/lib/metasploit/model/spec/temporary_pathname.rb +3 -0
- data/lib/metasploit/model/translation.rb +2 -0
- data/lib/metasploit/model/version.rb +0 -1
- data/lib/metasploit/model/visitation.rb +2 -0
- data/spec/app/models/metasploit/model/module/ancestor/spec/template_spec.rb +1 -1
- data/spec/lib/metasploit/model/engine_spec.rb +1 -1
- data/spec/lib/metasploit/model/login/status_spec.rb +83 -0
- data/spec/lib/metasploit/model/spec_spec.rb +3 -3
- data/spec/spec_helper.rb +4 -6
- metadata +22 -36
- data/lib/metasploit/model/configuration.rb +0 -72
- data/lib/metasploit/model/configuration/autoload.rb +0 -109
- data/lib/metasploit/model/configuration/child.rb +0 -12
- data/lib/metasploit/model/configuration/error.rb +0 -4
- data/lib/metasploit/model/configuration/i18n.rb +0 -54
- data/lib/metasploit/model/configuration/parent.rb +0 -50
- data/lib/metasploit/model/configured.rb +0 -46
- data/spec/lib/metasploit/model/configuration/autoload_spec.rb +0 -165
- data/spec/lib/metasploit/model/configuration/child_spec.rb +0 -24
- data/spec/lib/metasploit/model/configuration/error_spec.rb +0 -5
- data/spec/lib/metasploit/model/configuration/i18n_spec.rb +0 -103
- data/spec/lib/metasploit/model/configuration_spec.rb +0 -106
- data/spec/lib/metasploit/model/configured_spec.rb +0 -41
- data/spec/lib/metasploit/model_spec.rb +0 -68
- data/spec/support/shared/contexts/metasploit/model/configuration.rb +0 -11
- data/spec/support/shared/examples/metasploit/model/configuration/parent/child.rb +0 -60
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/authority'
|
2
|
+
|
1
3
|
# United States Computer Emergency Readiness Team Vulnerability Notes Database authority-specific code.
|
2
4
|
module Metasploit::Model::Authority::UsCertVu
|
3
5
|
# Returns URL to {Metasploit::Model::Reference#designation Vul ID's} page on US CERT Notes Database.
|
@@ -7,7 +7,7 @@ module Metasploit
|
|
7
7
|
#
|
8
8
|
# @example Full setup
|
9
9
|
# class Person < ActiveRecord::Base
|
10
|
-
# include
|
10
|
+
# include Metasploit::Model::Derivation
|
11
11
|
#
|
12
12
|
# #
|
13
13
|
# # Attributes
|
@@ -46,8 +46,11 @@ module Metasploit
|
|
46
46
|
# end
|
47
47
|
# end
|
48
48
|
module Derivation
|
49
|
+
extend ActiveSupport::Autoload
|
49
50
|
extend ActiveSupport::Concern
|
50
51
|
|
52
|
+
autoload :FullName
|
53
|
+
|
51
54
|
included do
|
52
55
|
include ActiveModel::Validations
|
53
56
|
include ActiveModel::Validations::Callbacks
|
@@ -3,6 +3,22 @@ module Metasploit
|
|
3
3
|
# Namespace that maps to `Mdm::Module` and `Metasploit::Framework::Module` and contains constants and mixins to
|
4
4
|
# DRY the implementation of the in-memory and in-database models in those namespaces.
|
5
5
|
module Module
|
6
|
+
extend ActiveSupport::Autoload
|
7
|
+
|
8
|
+
autoload :Action
|
9
|
+
autoload :Ancestor
|
10
|
+
autoload :Architecture
|
11
|
+
autoload :Author
|
12
|
+
autoload :Class
|
13
|
+
autoload :Handler
|
14
|
+
autoload :Instance
|
15
|
+
autoload :Path
|
16
|
+
autoload :Platform
|
17
|
+
autoload :Rank
|
18
|
+
autoload :Reference
|
19
|
+
autoload :Stance
|
20
|
+
autoload :Target
|
21
|
+
autoload :Type
|
6
22
|
end
|
7
23
|
end
|
8
24
|
end
|
@@ -1,13 +1,19 @@
|
|
1
|
+
require 'metasploit/model/module/type'
|
2
|
+
require 'metasploit/model/translation'
|
3
|
+
|
1
4
|
module Metasploit
|
2
5
|
module Model
|
3
6
|
module Module
|
4
7
|
# Code shared between `Mdm::Module::Ancestor` and `Metasploit::Framework::Module::Ancestor`.
|
5
8
|
module Ancestor
|
6
9
|
extend ActiveModel::Naming
|
10
|
+
extend ActiveSupport::Autoload
|
7
11
|
extend ActiveSupport::Concern
|
8
12
|
|
9
13
|
include Metasploit::Model::Translation
|
10
14
|
|
15
|
+
autoload :Spec
|
16
|
+
|
11
17
|
#
|
12
18
|
# CONSTANTS
|
13
19
|
#
|
@@ -1,13 +1,18 @@
|
|
1
|
+
require 'metasploit/model/translation'
|
2
|
+
|
1
3
|
module Metasploit
|
2
4
|
module Model
|
3
5
|
module Module
|
4
6
|
# Code shared between `Mdm::Module::Class` and `Metasploit::Framework::Module::Class`.
|
5
7
|
module Class
|
6
8
|
extend ActiveModel::Naming
|
9
|
+
extend ActiveSupport::Autoload
|
7
10
|
extend ActiveSupport::Concern
|
8
11
|
|
9
12
|
include Metasploit::Model::Translation
|
10
13
|
|
14
|
+
autoload :Spec
|
15
|
+
|
11
16
|
#
|
12
17
|
# CONSTANTS
|
13
18
|
#
|
@@ -1,13 +1,19 @@
|
|
1
|
+
require 'metasploit/model/module/type'
|
2
|
+
require 'metasploit/model/translation'
|
3
|
+
|
1
4
|
module Metasploit
|
2
5
|
module Model
|
3
6
|
module Module
|
4
7
|
# Code shared between `Mdm::Module::Instance` and `Metasploit::Framework::Module::Instance`.
|
5
8
|
module Instance
|
6
9
|
extend ActiveModel::Naming
|
10
|
+
extend ActiveSupport::Autoload
|
7
11
|
extend ActiveSupport::Concern
|
8
12
|
|
9
13
|
include Metasploit::Model::Translation
|
10
14
|
|
15
|
+
autoload :Spec
|
16
|
+
|
11
17
|
#
|
12
18
|
# CONSTANTS
|
13
19
|
#
|
@@ -1,13 +1,19 @@
|
|
1
|
+
require 'metasploit/model/translation'
|
2
|
+
|
1
3
|
module Metasploit
|
2
4
|
module Model
|
3
5
|
module Module
|
4
6
|
# Code shared between `Mdm::Module::Target` and `Metasploit::Framework::Module::Target`.
|
5
7
|
module Target
|
6
8
|
extend ActiveModel::Naming
|
9
|
+
extend ActiveSupport::Autoload
|
7
10
|
extend ActiveSupport::Concern
|
8
11
|
|
9
12
|
include Metasploit::Model::Translation
|
10
13
|
|
14
|
+
autoload :Architecture
|
15
|
+
autoload :Platform
|
16
|
+
|
11
17
|
included do
|
12
18
|
include ActiveModel::MassAssignmentSecurity
|
13
19
|
include ActiveModel::Validations
|
@@ -63,11 +63,20 @@ module Metasploit
|
|
63
63
|
# {include:Metasploit::Model::Search::Query}
|
64
64
|
module Search
|
65
65
|
extend ActiveSupport::Concern
|
66
|
+
extend ActiveSupport::Autoload
|
67
|
+
|
68
|
+
require 'metasploit/model/search/association'
|
69
|
+
require 'metasploit/model/search/attribute'
|
70
|
+
require 'metasploit/model/search/with'
|
66
71
|
|
67
72
|
include Metasploit::Model::Search::Association
|
68
73
|
include Metasploit::Model::Search::Attribute
|
69
74
|
include Metasploit::Model::Search::With
|
70
75
|
|
76
|
+
autoload :Group
|
77
|
+
autoload :Operation
|
78
|
+
autoload :Operator
|
79
|
+
|
71
80
|
# Allows operators registered with {Metasploit::Model::Search::Association::ClassMethods#search_association} and
|
72
81
|
# {Metasploit::Model::Search::Attribute::ClassMethods#search_attribute} to be looked up by name.
|
73
82
|
module ClassMethods
|
@@ -4,6 +4,10 @@ module Metasploit
|
|
4
4
|
# Namespace for search operations. {parse} acts as a factory to parse a `String` and return a type-specific
|
5
5
|
# operation.
|
6
6
|
module Operation
|
7
|
+
extend ActiveSupport::Autoload
|
8
|
+
|
9
|
+
autoload :Group
|
10
|
+
|
7
11
|
# @param options [Hash{Symbol => Object}]
|
8
12
|
# @option options [Metasploit::Module::Search::Query] :query The query that the parsed operation is a part.
|
9
13
|
# @option options [String] :formatted_operation A '<operator>:<value>' string.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
require 'metasploit/model/search/operator'
|
2
|
+
|
3
|
+
# Namespace for search operators that mimic behavior of the msfconsole search operators prior to the search operator
|
4
|
+
# generalization introduced by {Metasploit::Model::Search}.
|
5
|
+
module Metasploit::Model::Search::Operator::Deprecated
|
6
|
+
end
|
@@ -4,11 +4,18 @@ module Metasploit
|
|
4
4
|
module Model
|
5
5
|
# Helper methods for running specs for metasploit-model.
|
6
6
|
module Spec
|
7
|
+
require 'metasploit/model/spec/temporary_pathname'
|
8
|
+
|
9
|
+
extend ActiveSupport::Autoload
|
7
10
|
extend Metasploit::Model::Spec::TemporaryPathname
|
8
11
|
# without this, Module.shared_examples_for will be used and RSpec will count shared_examples created with
|
9
12
|
# {shared_examples_for} to not be declared at the top-level.
|
10
13
|
extend RSpec::Core::SharedExampleGroup::TopLevelDSL
|
11
14
|
|
15
|
+
autoload :Error
|
16
|
+
autoload :I18nExceptionHandler
|
17
|
+
autoload :PathnameCollision
|
18
|
+
|
12
19
|
# Defines a shared examples for a `Module` under the {Metasploit::Model} namespace. This `Module` is assumed to
|
13
20
|
# be a mixin that can be mixed into an ActiveModel in metasploit-framework or an ActiveRecord in
|
14
21
|
# metasploit_data_models. Shared examples declared using this method get access to boiler plate methods used
|