metasploit-model 0.26.1-java → 0.27.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +21 -27
- 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 +2 -2
- data/lib/metasploit/model/visitation.rb +2 -0
- data/metasploit-model.gemspec +1 -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 +28 -28
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f00a3be42674a0e481c5f0f74ec3065758d6025c
|
4
|
+
data.tar.gz: 29e0944508856bd9e9ba145bff1431ebe81400cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab380f2978f7650bce61b707394c60e79cfa9a7d707e9d2b06516a9aa9c18e9908d361201c3ee386fd7181253928387785cb0bec670e455e7e7b51cecc2452ae
|
7
|
+
data.tar.gz: b3f0b820799c55c84d60105fe337a5e337d8ba39e4636877376e0b9e0784328345f2b29acc9b7cbd37b1b145b445bca7c84cbff429923b05f362fced46308c8a
|
@@ -1,3 +1,7 @@
|
|
1
|
+
require 'metasploit/model/base'
|
2
|
+
require 'metasploit/model/module/class/spec'
|
3
|
+
require 'metasploit/model/spec/template/write'
|
4
|
+
|
1
5
|
# Writes templates for the {#module_class #module_class's} {Metasploit::Model::Module::Class#ancestors} to disk.
|
2
6
|
#
|
3
7
|
# @example Update files after changing associations
|
@@ -1,3 +1,7 @@
|
|
1
|
+
require 'metasploit/model/base'
|
2
|
+
require 'metasploit/model/module/instance/spec'
|
3
|
+
require 'metasploit/model/spec/template/write'
|
4
|
+
|
1
5
|
# Writes templates for the {#module_instance #module_instance's}
|
2
6
|
# {Metasploit::Model::Module::Instance#module_class #module_class's} {Metasploit::Model::Module::Class#ancestors} to
|
3
7
|
# disk.
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operation'
|
2
|
+
|
1
3
|
# An operation with a {Metasploit::Model::Search::Operator::Association} for
|
2
4
|
# {Metasploit::Model::Search::Operation::Base#operator} that wraps a {#source_operation} produced by the
|
3
5
|
# {Metasploit::Model::Search::Operator::Association#source_operator}. This allows an arbitrary number of associations
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'metasploit/model/base'
|
2
|
+
require 'metasploit/model/search/operation'
|
3
|
+
|
1
4
|
# Base of all search operations that combine an {#operator} with the {#value} it is operating on. Subclasses allow
|
2
5
|
# validations specific to the {#operator} {Metasploit::Model::Search::Operator::Single#type type}.
|
3
6
|
class Metasploit::Model::Search::Operation::Base < Metasploit::Model::Base
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operation'
|
2
|
+
|
1
3
|
# Search operation with {Metasploit::Model::Search::Operation::Base#operator} with `#type` `:boolean`. Validates that
|
2
4
|
# value is a proper boolean (`false` or `true`) or the `String` version of either.
|
3
5
|
class Metasploit::Model::Search::Operation::Boolean < Metasploit::Model::Search::Operation::Base
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operation'
|
2
|
+
|
1
3
|
# Search operation with {Metasploit::Model::Search::Operation::Base#operator} with `#type` ':date'. Validates that
|
2
4
|
# value is `String` that can parsed with `Date.parse` or already a `Date`.
|
3
5
|
class Metasploit::Model::Search::Operation::Date < Metasploit::Model::Search::Operation::Base
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operation/group'
|
2
|
+
|
1
3
|
# A group of one or more {#children child operations} from an operator's `#operate_on`, should be visited the same as
|
2
4
|
# {Metasploit::Model::Search::Group::Base}.
|
3
5
|
class Metasploit::Model::Search::Operation::Group::Base < Metasploit::Model::Search::Operation::Base
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operation/group'
|
2
|
+
|
1
3
|
# An intersection of one or more {Metasploit::Model::Search::Operation::Group::Base#children child operations} from an
|
2
4
|
# operator's `#operate_on`, should be visited the same as {Metasploit::Model::Search::Group::Base}.
|
3
5
|
class Metasploit::Model::Search::Operation::Group::Intersection < Metasploit::Model::Search::Operation::Group::Base
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operation/group'
|
2
|
+
|
1
3
|
# A union of one or more {Metasploit::Model::Search::Operation::Group::Base#children child operations} from an
|
2
4
|
# operator's `#operate_on`, should be visited the same as {Metasploit::Model::Search::Group::Base}.
|
3
5
|
class Metasploit::Model::Search::Operation::Group::Union < Metasploit::Model::Search::Operation::Group::Base
|
@@ -1,6 +1,10 @@
|
|
1
|
+
require 'metasploit/model/search/operation'
|
2
|
+
|
1
3
|
# Search operation with {Metasploit::Model::Search::Operation::Base#operator} with `#type` `:integer`. Validates that
|
2
4
|
# value is an integer.
|
3
5
|
class Metasploit::Model::Search::Operation::Integer < Metasploit::Model::Search::Operation::Base
|
6
|
+
require 'metasploit/model/search/operation/integer/value'
|
7
|
+
|
4
8
|
include Metasploit::Model::Search::Operation::Integer::Value
|
5
9
|
|
6
10
|
#
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operation/integer'
|
2
|
+
|
1
3
|
# Search operation on an attribute that has a `Set<Integer>` for acceptable
|
2
4
|
# {Metasploit::Model::Search::Operation::Base values}.
|
3
5
|
class Metasploit::Model::Search::Operation::Set::Integer < Metasploit::Model::Search::Operation::Set
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operation/string'
|
2
|
+
|
1
3
|
# Search operation on an attribute that has a `Set<String>` for acceptable
|
2
4
|
# {Metasploit::Model::Search::Operation::Base values}.
|
3
5
|
class Metasploit::Model::Search::Operation::Set::String < Metasploit::Model::Search::Operation::Set
|
@@ -1,5 +1,9 @@
|
|
1
|
+
require 'metasploit/model/search/operation'
|
2
|
+
|
1
3
|
# Search operation with {Metasploit::Model::Search::Operation::Base#operator} with `#type` `:string`.
|
2
4
|
class Metasploit::Model::Search::Operation::String < Metasploit::Model::Search::Operation::Base
|
5
|
+
require 'metasploit/model/search/operation/string/value'
|
6
|
+
|
3
7
|
include Metasploit::Model::Search::Operation::String::Value
|
4
8
|
|
5
9
|
#
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator'
|
2
|
+
|
1
3
|
# A search operator declared with
|
2
4
|
# {Metasploit::Model::Search::Association::ClassMethods#search_association search_association}.
|
3
5
|
class Metasploit::Model::Search::Operator::Association < Metasploit::Model::Search::Operator::Base
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator'
|
2
|
+
|
1
3
|
# A search operator declared with
|
2
4
|
# {Metasploit::Model::Search::Attribute::ClassMethods#search_attribute search_attribute}.
|
3
5
|
class Metasploit::Model::Search::Operator::Attribute < Metasploit::Model::Search::Operator::Single
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/deprecated'
|
2
|
+
|
1
3
|
# Emulates the deprecated `app` operator by converting it to the union of `authors.name:<value>`,
|
2
4
|
# `email_addresses.local<value before '@'>`, and `email_addresses.domain:<value before '@'>` in {#operate_on}.
|
3
5
|
class Metasploit::Model::Search::Operator::Deprecated::App < Metasploit::Model::Search::Operator::Delegation
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/deprecated'
|
2
|
+
|
1
3
|
# Operator that emulates the behavior of 'author' operator that could search `Mdm::Module::Detail` by making
|
2
4
|
# {Metasploit::Model::Search::Operation::Group::Union} between `authors.name`, `email_addresss.domain`, and
|
3
5
|
# `email_addresses.local`.
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/deprecated'
|
2
|
+
|
1
3
|
# Operator for the direct, single authority reference search. Translates `<abbreviation>:<designation>` to
|
2
4
|
# `authorities.abbreviation:<abbreviation> references.designation:<designation>`.
|
3
5
|
class Metasploit::Model::Search::Operator::Deprecated::Authority < Metasploit::Model::Search::Operator::Delegation
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/deprecated'
|
2
|
+
|
1
3
|
# Translates `<name>:<value>` to the union of `platforms.name:<value>` and `targets.name:<value>` in order to support
|
2
4
|
# the `os` and `platform` operators.
|
3
5
|
class Metasploit::Model::Search::Operator::Deprecated::Platform < Metasploit::Model::Search::Operator::Group::Union
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/deprecated'
|
2
|
+
|
1
3
|
# Translates `ref:<value>` to union of `authorities.abbreviation:<value>`, `references.designation:<value>`, and
|
2
4
|
# `references.designation:<value>`.
|
3
5
|
class Metasploit::Model::Search::Operator::Deprecated::Ref < Metasploit::Model::Search::Operator::Group::Union
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/deprecated'
|
2
|
+
|
1
3
|
# Search the equivalent of the text fields from `Mdm::Module::Detail` and its associations, making a union of
|
2
4
|
# `description`, `name`, `actions.name`, `architectures.abbreviation`, `platform`, and `ref`.
|
3
5
|
class Metasploit::Model::Search::Operator::Deprecated::Text < Metasploit::Model::Search::Operator::Group::Union
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/group'
|
2
|
+
|
1
3
|
# Operator that {#operate_on produces} {Metasploit::Model::Search::Operation::Group::Base group operations}.
|
2
4
|
class Metasploit::Model::Search::Operator::Group::Base < Metasploit::Model::Search::Operator::Delegation
|
3
5
|
#
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/group'
|
2
|
+
|
1
3
|
# Operator that {Metasploit::Model::Search::Operator::Group::Base#operate_on produces}
|
2
4
|
# {Metasploit::Model::Search::Operation::Group::Intersection intersection operations}.
|
3
5
|
class Metasploit::Model::Search::Operator::Group::Intersection < Metasploit::Model::Search::Operator::Group::Base
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/group'
|
2
|
+
|
1
3
|
# Operator that {Metasploit::Model::Search::Operator::Group::Base#operate_on produces}
|
2
4
|
# {Metasploit::Model::Search::Operation::Group::Union union operations}.
|
3
5
|
class Metasploit::Model::Search::Operator::Group::Union < Metasploit::Model::Search::Operator::Group::Base
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'metasploit/model/search/operator/single'
|
2
|
+
|
1
3
|
# If all you want do is customize the name and operation `Class` that your custom operator class returns from
|
2
4
|
# `#operate_on`, then you can subclass {Metasploit::Model::Search::Operator::Single} instead of
|
3
5
|
# {Metasploit::Model::Search::Operator::Base}.
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'metasploit/model/base'
|
2
|
+
require 'metasploit/model/search'
|
3
|
+
|
1
4
|
# Once {Metasploit::Model::Search::Operator search operators} are {Metasploit::Model::Search defined}, a formatted
|
2
5
|
# query, composed of space separated formatted operation, `<operator.name>:<formatted_value>`, can be parsed to
|
3
6
|
# produce a validatable query.
|
@@ -1,12 +1,19 @@
|
|
1
|
+
require 'metasploit/model/base'
|
2
|
+
require 'metasploit/model/spec'
|
3
|
+
|
1
4
|
# Processes {EXTENSION '.rb.erb'} templates to create {Metasploit::Model::Module::Ancestor#contents} that contain the
|
2
5
|
# same metadata as the {Metasploit::Model::Module::Ancestor},
|
3
6
|
# {Metasploit::Model::Module::Class}, {Metasploit::Model::Module::Instance} and associations for those contents. This
|
4
7
|
# ensures that when the {Metasploit::Model::Module::Ancestor#contents} are loaded in metasploit-framework, the same
|
5
8
|
# metadata instances are derived from the contents ensuring idempotency of the contents and metadata parsing loop.
|
6
9
|
class Metasploit::Model::Spec::Template < Metasploit::Model::Base
|
10
|
+
extend ActiveSupport::Autoload
|
7
11
|
extend ActiveModel::Callbacks
|
12
|
+
|
8
13
|
include ActiveModel::Validations::Callbacks
|
9
14
|
|
15
|
+
autoload :Write
|
16
|
+
|
10
17
|
#
|
11
18
|
# CONSTANTS
|
12
19
|
#
|
@@ -193,10 +200,10 @@ class Metasploit::Model::Spec::Template < Metasploit::Model::Base
|
|
193
200
|
#
|
194
201
|
# @return [Pathname] Defaults to 'spec/support/templates/metasploit/model' under Metasploit::Model.root.
|
195
202
|
def root
|
196
|
-
@@root ||= Metasploit::Model.root.join('spec', 'support', 'templates', 'metasploit', 'model')
|
203
|
+
@@root ||= Metasploit::Model::Engine.root.join('spec', 'support', 'templates', 'metasploit', 'model')
|
197
204
|
end
|
198
205
|
|
199
|
-
# Sets the {
|
206
|
+
# Sets the {root} pathname for all {#search_pathnames}, including those on subclasses.
|
200
207
|
#
|
201
208
|
# @param root [Pathname]
|
202
209
|
# @return [Pathname]
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'metasploit/model/base'
|
2
|
+
require 'metasploit/model/visitation'
|
3
|
+
|
1
4
|
# Visits node in a {http://en.wikipedia.org/wiki/Tree_(data_structure) tree}, such as
|
2
5
|
# {Metasploit::Model::Search::Query#tree}.
|
3
6
|
class Metasploit::Model::Visitation::Visitor < Metasploit::Model::Base
|
data/lib/metasploit/model.rb
CHANGED
@@ -9,13 +9,9 @@ require 'active_support/dependencies'
|
|
9
9
|
#
|
10
10
|
# Project
|
11
11
|
#
|
12
|
-
require 'metasploit/model/version'
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
if defined? Rails
|
17
|
-
require 'metasploit/model/engine'
|
18
|
-
end
|
13
|
+
require 'metasploit/model/engine'
|
14
|
+
require 'metasploit/model/version'
|
19
15
|
|
20
16
|
# Top-level namespace shared between metasploit-model, metasploit-framework, and Pro.
|
21
17
|
module Metasploit
|
@@ -24,15 +20,28 @@ module Metasploit
|
|
24
20
|
# separate gem for this shard code outside of metasploit_data_models is necessary as metasploit_data_models is an
|
25
21
|
# optional dependency for metasploit-framework as metasploit-framework can work without a database.
|
26
22
|
module Model
|
27
|
-
|
28
|
-
extend Metasploit::Model::Configured
|
23
|
+
extend ActiveSupport::Autoload
|
29
24
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
25
|
+
autoload :Architecture
|
26
|
+
autoload :Association
|
27
|
+
autoload :Author
|
28
|
+
autoload :Authority
|
29
|
+
autoload :Base
|
30
|
+
autoload :Derivation
|
31
|
+
autoload :EmailAddress
|
32
|
+
autoload :Error
|
33
|
+
autoload :File
|
34
|
+
autoload :Invalid
|
35
|
+
autoload :Login
|
36
|
+
autoload :Module
|
37
|
+
autoload :NilifyBlanks
|
38
|
+
autoload :Platform
|
39
|
+
autoload :RealPathname
|
40
|
+
autoload :Realm
|
41
|
+
autoload :Reference
|
42
|
+
autoload :Search
|
43
|
+
autoload :Spec
|
44
|
+
autoload :Translation
|
45
|
+
autoload :Visitation
|
35
46
|
end
|
36
47
|
end
|
37
|
-
|
38
|
-
Metasploit::Model.setup
|
@@ -3,8 +3,12 @@ module Metasploit
|
|
3
3
|
# Allows registering the class name of assocations similar to ActiveRecord associations, so that ActiveModel
|
4
4
|
# associations can be reflected with the same API as ActiveRecord associations.
|
5
5
|
module Association
|
6
|
+
extend ActiveSupport::Autoload
|
6
7
|
extend ActiveSupport::Concern
|
7
8
|
|
9
|
+
autoload :Error
|
10
|
+
autoload :Tree
|
11
|
+
|
8
12
|
# Defines DSL for define associations on ActiveModels with {#association}, which can then be retrieved in bulk
|
9
13
|
# with {#association_by_name} or a single association's reflection by name with {#reflect_on_association}.
|
10
14
|
module ClassMethods
|
@@ -1,12 +1,26 @@
|
|
1
|
+
require 'metasploit/model/search'
|
2
|
+
require 'metasploit/model/translation'
|
3
|
+
|
1
4
|
module Metasploit
|
2
5
|
module Model
|
3
6
|
# Code shared between `Mdm::Authority` and `Metasploit::Framework::Authority`.
|
4
7
|
module Authority
|
5
8
|
extend ActiveModel::Naming
|
9
|
+
extend ActiveSupport::Autoload
|
6
10
|
extend ActiveSupport::Concern
|
7
11
|
|
8
12
|
include Metasploit::Model::Translation
|
9
13
|
|
14
|
+
autoload :Bid
|
15
|
+
autoload :Cve
|
16
|
+
autoload :Msb
|
17
|
+
autoload :Osvdb
|
18
|
+
autoload :Pmasa
|
19
|
+
autoload :Secunia
|
20
|
+
autoload :UsCertVu
|
21
|
+
autoload :Waraxe
|
22
|
+
autoload :Zdi
|
23
|
+
|
10
24
|
included do
|
11
25
|
include ActiveModel::MassAssignmentSecurity
|
12
26
|
include ActiveModel::Validations
|