metasploit-model 5.0.6 → 5.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71c7072d9d33b6f6a7242fd215a3ffb9926ef18125d5ba343d5f822a91d4c9a4
4
- data.tar.gz: ecfd3d773674691614cf83a4d770068a92b9ac05ac1298101dc3032c55bd1f3e
3
+ metadata.gz: 0e856f40054d88e8b0f446f9d539b3e6cf82d7fdf4a57cfea6daee41f0ed6270
4
+ data.tar.gz: 1f501c26a8ea686c724ef8451eea88487ce3d1d7c78f71b4ad20afd4fcbede72
5
5
  SHA512:
6
- metadata.gz: b1ec0868af03c84b6e6a6c6712324277ea42b614107ea55595d70d1774fdc46a1abdfb54dcb1141495a527314fb4f51ec8d6111da8b937c34e86a9b9341d622f
7
- data.tar.gz: 25391a7a01c6e4e69903e126183bf02cc8f80da5480711ea9eb24efe82a97788257e12f4674ad8b6f6ac6c3cf4f1431711dd4c744af96779c588f8266941f362
6
+ metadata.gz: be0373bf6d452064b3ff7f47dad4465a4fe27a0aeafbb196608c70885eeb7ed54df2455b9de75028cbcb4974e74e2da7a67f6c3b697065f124e9ab9c30895edc
7
+ data.tar.gz: f8431f19ea917c5774833392322da1ee1f5a85662d1e52e424a4aab117aef4ed50a2afd59b351261ca23419f247b0837c3fc2daca1dd72a1dac803140b0e193b
@@ -28,7 +28,6 @@ jobs:
28
28
  build:
29
29
  uses: rapid7/metasploit-framework/.github/workflows/shared_gem_verify_rails.yml@master
30
30
  with:
31
- dependencies: '["graphviz"]'
32
31
  test_commands: |
33
32
  cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
34
33
  bundle exec rake --version
data/.yardopts CHANGED
@@ -1,5 +1,4 @@
1
1
  --markup markdown
2
- --plugin yard-metasploit-erd
3
2
  --private
4
3
  --protected
5
4
  {app,lib}/**/*.rb
data/Gemfile CHANGED
@@ -20,11 +20,9 @@ group :development, :test do
20
20
  end
21
21
 
22
22
  group :test do
23
- # rails is not used because activerecord should not be included, but rails would normally coordinate the versions
24
- # between its dependencies, which is now handled by this constraint.
25
-
26
- # Dummy app uses actionpack for ActionController, but not rails since it doesn't use activerecord.
23
+ # Rails components required by the dummy application.
27
24
  gem 'actionpack'
25
+ gem 'activerecord'
28
26
  # Engine tasks are loaded using railtie
29
27
  gem 'railties'
30
28
  gem 'rspec-rails'
@@ -38,6 +36,6 @@ group :test do
38
36
  gem 'shoulda-matchers'
39
37
  # code coverage of tests
40
38
  gem 'simplecov', :require => false
41
- # defines time zones for activesupport. Must be explicit since it is normally implicit with activerecord
39
+ # defines time zones for activesupport.
42
40
  gem 'tzinfo'
43
41
  end
data/Rakefile CHANGED
@@ -10,8 +10,8 @@ APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
10
10
 
11
11
  begin
12
12
  load 'rails/tasks/engine.rake'
13
- rescue LoadError
14
- puts "railties not in bundle, so can't load engine tasks."
13
+ rescue LoadError => error
14
+ puts "Can't load engine tasks: #{error.message}"
15
15
  print_without = true
16
16
  end
17
17
 
@@ -60,7 +60,6 @@ else
60
60
  end
61
61
 
62
62
  if print_without
63
- puts "Bundle currently installed '--without #{Bundler.settings.without.join(' ')}'."
64
- puts "To clear the without option do `bundle install --without ''` (the --without flag with an empty string) or " \
65
- "`rm -rf .bundle` to remove the .bundle/config manually and then `bundle install`"
63
+ puts "Bundle currently installed '--without #{Array(Bundler.settings[:without]).join(' ')}'."
64
+ puts "To clear the without option, run `bundle config unset without` and then `bundle install`."
66
65
  end
@@ -1,4 +1,4 @@
1
- # If all you want do is customize the name and operation `Class` that your custom operator class returns from
1
+ # If all you want to do is customize the name and operation `Class` that your custom operator class returns from
2
2
  # `#operate_on`, then you can subclass {Metasploit::Model::Search::Operator::Single} instead of
3
3
  # {Metasploit::Model::Search::Operator::Base}.
4
4
  #
@@ -59,7 +59,7 @@ class Metasploit::Model::Search::Query < Metasploit::Model::Base
59
59
  :length => {
60
60
  :minimum => 1
61
61
  }
62
- # validate recursive so misnamed operators or bad values for operator's types cause the query to be invalid as a whole
62
+ # validate recursively so misnamed operators or bad values for operator's types cause the query to be invalid as a whole
63
63
  validate :operations_valid
64
64
 
65
65
  #
@@ -85,7 +85,7 @@ class Metasploit::Model::Search::Query < Metasploit::Model::Base
85
85
  end
86
86
 
87
87
  # Parses {#formatted} to create search operations that can validate if the
88
- # {Metasploit::Model::Search::Operation::Base#value value} is correct the operation's
88
+ # {Metasploit::Model::Search::Operation::Base#value value} is correct for the operation's
89
89
  # {Metasploit::Model::Search::Operation::Base#operator operator's} type.
90
90
  #
91
91
  # @return [Array<Metasploit::Model::Search::Operation::Base>] an Array of operation parsed from {#formatted}.
@@ -85,7 +85,7 @@ class ParametersValidator < ActiveModel::EachValidator
85
85
 
86
86
  private
87
87
 
88
- # Generates error message for element at the given index. Prefix is prepened to {#location_clause} to make a
88
+ # Generates error message for element at the given index. Prefix is prepended to {#location_clause} to make a
89
89
  # sentence. {TYPE_SIGNATURE_SENTENCE} is appended to that sentence.
90
90
  #
91
91
  # @param options [Hash{Symbol => Object}]
@@ -79,7 +79,7 @@ class PasswordIsStrongValidator < ActiveModel::EachValidator
79
79
  # Returns a leet mutated variant of the original password
80
80
  #
81
81
  # @param password [String]
82
- # @return [String] containing the password with leet mutations
82
+ # @return [Array<String>] containing the password with leet mutations
83
83
  def mutate_pass(password)
84
84
  mutations = {
85
85
  'a' => '@',
@@ -1,4 +1,4 @@
1
- # Functions for turning a compact tree of compact as passed to
1
+ # Functions for turning a compact tree of associations as passed to
2
2
  # {Metasploit::Model::Search::Association::ClassMethods#search_associations} into an expanded
3
3
  # {Metasploit::Model::Search::Association::ClassMethods#search_association_tree}.
4
4
  module Metasploit::Model::Association::Tree
@@ -2,7 +2,7 @@
2
2
  # {Metasploit::Model::Search::Attribute::ClassMethods#search_attribute},
3
3
  # {Metasploit::Model::Search::With::ClassMethods#search_with}.
4
4
  #
5
- # Searchable associations are declared explicitly so that associations cycles can be avoided and the search
5
+ # Searchable associations are declared explicitly so that association cycles can be avoided and the search
6
6
  # interface can be tuned for clarity and complexity.
7
7
  #
8
8
  # # Testing
@@ -109,7 +109,7 @@ module Metasploit::Model::Search::Association
109
109
  end
110
110
 
111
111
  # Registers a tree of near and far associations for search. When a tree is used, all intermediate association
112
- # on the paths are used, so `search_association children: :grandchildren` makes both `children.granchildren`
112
+ # on the paths are used, so `search_association children: :grandchildren` makes both `children.grandchildren`
113
113
  # *and* `children` as search operator prefixes.
114
114
  #
115
115
  # @example a single search association
@@ -5,7 +5,7 @@
5
5
  #
6
6
  # # Set attributes
7
7
  #
8
- # Search attributes declared as having an integer set or string set type integer or string set require a
8
+ # Search attributes declared as having an integer set or string set type require a
9
9
  # `<attribute>_set` method to be defined on the `Class`, which returns the set of allowed values for the search
10
10
  # attribute's operation. This method will be called, indirectly by
11
11
  # {Metasploit::Model::Search::Operation::Set::Integer}'s and {Metasploit::Model::Search::Operation::Set::String}'s
@@ -13,7 +13,7 @@
13
13
  #
14
14
  # # Help
15
15
  #
16
- # The help for each operator is uses the `I18n` system, so the help for an attribute operator on a given class can
16
+ # The help for each operator uses the `I18n` system, so the help for an attribute operator on a given class can
17
17
  # added to `config/locales/<lang>.yml`. The scope of the lookup, under the language key is the `Class`'s
18
18
  # `i18n_scope`, which is `metasploit.model` if the `Class` includes {Metasploit::Model::Translation} or
19
19
  # `active_record` for `ApplicationRecord` subclasses. Under the `i18n_scope`, any `Module#ancestor`'s
@@ -106,7 +106,7 @@
106
106
  # @endianness_set ||= Set.new(['big', 'litte'])
107
107
  # end
108
108
  #
109
- # @example search an attribute by substring (case-insensitve LIKE)
109
+ # @example search an attribute by substring (case-insensitive LIKE)
110
110
  # search_attribute :description,
111
111
  # type: :string
112
112
  module Metasploit::Model::Search::Attribute
@@ -15,7 +15,7 @@
15
15
  # require path
16
16
  # end
17
17
  #
18
- # In the spec fo the `Class` that called `search_with`, use the 'search_with' shared example by passing the
18
+ # In the spec for the `Class` that called `search_with`, use the 'search_with' shared example by passing the
19
19
  # arguments passed to {ClassMethods#search_attribute}.
20
20
  #
21
21
  # # app/models/my_class.rb
@@ -48,11 +48,11 @@ module Metasploit::Model::Search::With
48
48
  # Defines `search_with` DSL, which is a lower-level way than search_attribute to add operators. `search_with`
49
49
  # allows instance of arbitrary operator_classes to be registered in {#search_with_operator_by_name}.
50
50
  module ClassMethods
51
- # Declares that this class should be search with an instance of the given `operator_class`.
51
+ # Declares that this class should be searched with an instance of the given `operator_class`.
52
52
  #
53
53
  # @param operator_class [Class<Metasploit::Model::Search::Operator::Base>] a class to initialize.
54
54
  # @param options [Hash] Options passed to `operator_class.new` along with `{:klass => self}`, so that the
55
- # `operator_class` instance knows it was registered as search this class.
55
+ # `operator_class` instance knows it was registered as searching this class.
56
56
  # @return [Metasploit::Model::Search::Operator::Base]
57
57
  # @raise (see Metasploit::Model::Base#invalid!)
58
58
  def search_with(operator_class, options={})
@@ -22,8 +22,8 @@
22
22
  #
23
23
  # ## Custom search operators
24
24
  #
25
- # If a search operator does not directly correspond to an attribute or a the attribute needs custom validation, then
26
- # a custom {Metasploit::Model::Search::Operator operator class} can be setup as the search operator
25
+ # If a search operator does not directly correspond to an attribute or the attribute needs custom validation, then
26
+ # a custom {Metasploit::Model::Search::Operator operator class} can be set up as the search operator
27
27
  #
28
28
  # class Search::Operator::UUID
29
29
  # def name
@@ -1,7 +1,7 @@
1
1
  module Metasploit
2
2
  module Model
3
3
  # VERSION is managed by GemRelease
4
- VERSION = '5.0.6'
4
+ VERSION = '5.0.8'
5
5
 
6
6
  # @return [String]
7
7
  #
@@ -1,5 +1,5 @@
1
1
  # {ClassMethods#visit DSL} to declare {Metasploit::Model::Visitation::Visitor visitors} for a given `Module#name`
2
- # (or any Class that has an ancestor in `Class#ancestors` with that `Module#name`) and then use then to {#visit}
2
+ # (or any Class that has an ancestor in `Class#ancestors` with that `Module#name`) and then use them to {#visit}
3
3
  # instances of those class and/or modules.
4
4
  module Metasploit::Model::Visitation::Visit
5
5
  extend ActiveSupport::Concern
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
20
20
  spec.required_ruby_version = '>= 2.7.0'
21
21
 
22
22
  spec.add_development_dependency 'metasploit-yard'
23
- spec.add_development_dependency 'metasploit-erd'
24
23
  spec.add_development_dependency 'rake'
25
24
  spec.add_development_dependency 'yard'
26
25
  spec.add_development_dependency 'e2mmap'
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema[8.0].define(version: 0) do
13
+ ActiveRecord::Schema[8.1].define(version: 0) do
14
14
  # These are extensions that must be enabled in order to support this database
15
15
  enable_extension "pg_catalog.plpgsql"
16
16
 
@@ -5,7 +5,7 @@ RSpec.describe Metasploit::Model do
5
5
  described_class::VERSION
6
6
  }
7
7
 
8
- it 'is Metasploit::ERD::Version.full' do
8
+ it 'is Metasploit::Model::VERSION' do
9
9
  expect(version).to eq(Metasploit::Model::VERSION)
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.6
4
+ version: 5.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-18 00:00:00.000000000 Z
11
+ date: 2026-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metasploit-yard
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: metasploit-erd
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rake
43
29
  requirement: !ruby/object:Gem::Requirement