metasploit_data_models 4.1.4 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cce023c97fe6144aadc776c3940166846e8a79486744d9552a7b460b61641525
4
- data.tar.gz: 8400cc5756c2dfd3d063c18a9ff0257c8729f85008ce043217af3db28c5cade2
3
+ metadata.gz: a15267e2f6c71ba5b58fdfea90153b170f940e65b01b85d3612bcdf1694c298f
4
+ data.tar.gz: fb5e035e7e80f3dea304ed1ca8cacc463117300357c9386d341196e968003d8b
5
5
  SHA512:
6
- metadata.gz: 79deb575ba6a357e752ebcc30b767cf395b6f0a1cc5ff6042da23c439c3f96d6e8c7875fa4137b42e1ae5825e15b81d948bc8c6cc5464912ee23cf368f976683
7
- data.tar.gz: 10c4a62fed219f974469d48c4e9e28ff0056f7f1401c3562ee19a028a2fe93c5c312907b4e5d8c5d2b39e914d27e25100474ca32fb79f5006fdc71e0169946de
6
+ metadata.gz: 2670839b6eace925d4da176c76da44cfbb54e774a50755a7095ef3de8220a81c146a442d258eee7e6e91abad2fae76ab82e49e7998fef749ea95173a2871a98c
7
+ data.tar.gz: e6a013485f5b639a31d1232743c847787853bb61fab191a2e619dbfe1d5853b8c4fe7bc905847a3a38910da59accd4b1488fe47eb81f10e96f98da3e38a14ba9
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- H���?���!�$�J�����GBASf�<p�"���`@�՛^�p_>�8���)a�c�Ќ|%H�ر3�cdM�����HQ��o���JY_ ��tF���]�=$D��]ˊ�����[z$����f��AI5.�ԃ���(��j��-P7��e��Ώ�i"T�@���X����7$�L]j<`J�ue��9���Q�\i8���X߀J����Dw%w�����=l�z�ˠH��]�
1
+ Q#�4�����6��eR[�e�`�n����:�ٽ)5��fh�p��Y��訋踦�a�
2
+ ��ԩ���1��y�ꮬ�X��氓��D=Io����:
data/Gemfile CHANGED
@@ -27,8 +27,6 @@ group :development, :test do
27
27
  # bound to 0.20 for Activerecord 4.2.8 deprecation warnings:
28
28
  # https://github.com/ged/ruby-pg/commit/c90ac644e861857ae75638eb6954b1cb49617090
29
29
  gem 'pg'
30
-
31
- gem 'pry'
32
30
  end
33
31
 
34
32
  group :test do
data/README.md CHANGED
@@ -41,6 +41,14 @@ different `on_load` name, which is just the class name converted to an underscor
41
41
 
42
42
  require 'metasploit_data_models/engine'
43
43
 
44
+ `ArelHelper` classes must also be included in your applications `app/models/application_record.rb` class:
45
+
46
+ class ApplicationRecord < ActiveRecord::Base
47
+ self.abstract_class = true
48
+ include ArelHelpers::ArelTable
49
+ include ArelHelpers::JoinAssociation
50
+ end
51
+
44
52
  ### Metasploit Framework
45
53
 
46
54
  In Metasploit Framework, `MetasploitDataModels::Engine` is loaded, but the data models are only if the user wants to use
@@ -12,7 +12,7 @@ class MetasploitDataModels::IPAddress::V4::Segment::Nmap::List < Metasploit::Mod
12
12
  # Either an individual {MetasploitDataModels::IPAddress::V4::Segment::Single segment number} or a
13
13
  # {MetasploitDataModels::IPAddress::V4::Segment::Nmap::Range segment range}.
14
14
  RANGE_OR_NUMBER_REGEXP = %r{
15
- (?<range>#{parent::Range.regexp})
15
+ (?<range>#{module_parent::Range.regexp})
16
16
  |
17
17
  # range first because it contains a segment and if the range isn't first only the first part of the range will
18
18
  # match.
@@ -67,7 +67,7 @@ class MetasploitDataModels::Search::Visitor::Relation < Metasploit::Model::Base
67
67
  # @return [Hash{Symbol => Class}]
68
68
  def self.visitor_class_by_relation_method
69
69
  @relation_method_by_visitor_class ||= RELATION_METHODS.each_with_object({}) { |relation_method, relation_method_by_visitor_class|
70
- visitor_class_name = "#{parent.name}::#{relation_method.to_s.camelize}"
70
+ visitor_class_name = "#{module_parent.name}::#{relation_method.to_s.camelize}"
71
71
  visitor_class = visitor_class_name.constantize
72
72
 
73
73
  relation_method_by_visitor_class[relation_method] = visitor_class
@@ -1,6 +1,6 @@
1
1
  module MetasploitDataModels
2
2
  # VERSION is managed by GemRelease
3
- VERSION = '4.1.4'
3
+ VERSION = '5.0.0'
4
4
 
5
5
  # @return [String]
6
6
  #
@@ -33,11 +33,11 @@ Gem::Specification.new do |s|
33
33
  s.add_development_dependency 'pry'
34
34
 
35
35
 
36
- s.add_runtime_dependency 'activerecord', '~>5.2.2'
37
- s.add_runtime_dependency 'activesupport', '~>5.2.2'
36
+ s.add_runtime_dependency 'activerecord', '~>6.0'
37
+ s.add_runtime_dependency 'activesupport', '~>6.0'
38
38
  s.add_runtime_dependency 'metasploit-concern'
39
39
  s.add_runtime_dependency 'metasploit-model', '>=3.1'
40
- s.add_runtime_dependency 'railties', '~>5.2.2'
40
+ s.add_runtime_dependency 'railties', '~>6.0'
41
41
  s.add_runtime_dependency 'webrick'
42
42
 
43
43
  # os fingerprinting
@@ -28,7 +28,11 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Attribute, type: :model do
28
28
  end
29
29
 
30
30
  it "should be #{node_class}#attribute" do
31
- expect(name).to eq(node.attribute)
31
+ if node.attribute.instance_of? Symbol
32
+ expect(name.to_s).to eq(node.attribute.to_s)
33
+ else
34
+ expect(name).to eq(node.attribute)
35
+ end
32
36
  end
33
37
  end
34
38
 
@@ -93,4 +97,4 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Attribute, type: :model do
93
97
  }
94
98
  end
95
99
  end
96
- end
100
+ end
@@ -1,3 +1,5 @@
1
1
  class ApplicationRecord < ActiveRecord::Base
2
2
  self.abstract_class = true
3
+ include ArelHelpers::ArelTable
4
+ include ArelHelpers::JoinAssociation
3
5
  end
@@ -56,6 +56,8 @@ module Dummy
56
56
 
57
57
  # Version of your assets, change this if you want to expire all your assets
58
58
  config.assets.version = '1.0'
59
+
60
+ config.autoloader = :zeitwerk
59
61
  end
60
62
  end
61
63
 
@@ -0,0 +1,7 @@
1
+ test:
2
+ service: Disk
3
+ root: <%= Rails.root.join("tmp/storage") %>
4
+
5
+ local:
6
+ service: Disk
7
+ root: <%= Rails.root.join("storage") %>
@@ -5,27 +5,12 @@ SET client_encoding = 'UTF8';
5
5
  SET standard_conforming_strings = on;
6
6
  SELECT pg_catalog.set_config('search_path', '', false);
7
7
  SET check_function_bodies = false;
8
+ SET xmloption = content;
8
9
  SET client_min_messages = warning;
9
10
  SET row_security = off;
10
11
 
11
- --
12
- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
13
- --
14
-
15
- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
16
-
17
-
18
- --
19
- -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
20
- --
21
-
22
- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
23
-
24
-
25
12
  SET default_tablespace = '';
26
13
 
27
- SET default_with_oids = false;
28
-
29
14
  --
30
15
  -- Name: api_keys; Type: TABLE; Schema: public; Owner: -
31
16
  --
@@ -64,8 +49,8 @@ ALTER SEQUENCE public.api_keys_id_seq OWNED BY public.api_keys.id;
64
49
  CREATE TABLE public.ar_internal_metadata (
65
50
  key character varying NOT NULL,
66
51
  value character varying,
67
- created_at timestamp without time zone NOT NULL,
68
- updated_at timestamp without time zone NOT NULL
52
+ created_at timestamp(6) without time zone NOT NULL,
53
+ updated_at timestamp(6) without time zone NOT NULL
69
54
  );
70
55
 
71
56
 
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: 4.1.4
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -185,28 +185,28 @@ dependencies:
185
185
  requirements:
186
186
  - - "~>"
187
187
  - !ruby/object:Gem::Version
188
- version: 5.2.2
188
+ version: '6.0'
189
189
  type: :runtime
190
190
  prerelease: false
191
191
  version_requirements: !ruby/object:Gem::Requirement
192
192
  requirements:
193
193
  - - "~>"
194
194
  - !ruby/object:Gem::Version
195
- version: 5.2.2
195
+ version: '6.0'
196
196
  - !ruby/object:Gem::Dependency
197
197
  name: activesupport
198
198
  requirement: !ruby/object:Gem::Requirement
199
199
  requirements:
200
200
  - - "~>"
201
201
  - !ruby/object:Gem::Version
202
- version: 5.2.2
202
+ version: '6.0'
203
203
  type: :runtime
204
204
  prerelease: false
205
205
  version_requirements: !ruby/object:Gem::Requirement
206
206
  requirements:
207
207
  - - "~>"
208
208
  - !ruby/object:Gem::Version
209
- version: 5.2.2
209
+ version: '6.0'
210
210
  - !ruby/object:Gem::Dependency
211
211
  name: metasploit-concern
212
212
  requirement: !ruby/object:Gem::Requirement
@@ -241,14 +241,14 @@ dependencies:
241
241
  requirements:
242
242
  - - "~>"
243
243
  - !ruby/object:Gem::Version
244
- version: 5.2.2
244
+ version: '6.0'
245
245
  type: :runtime
246
246
  prerelease: false
247
247
  version_requirements: !ruby/object:Gem::Requirement
248
248
  requirements:
249
249
  - - "~>"
250
250
  - !ruby/object:Gem::Version
251
- version: 5.2.2
251
+ version: '6.0'
252
252
  - !ruby/object:Gem::Dependency
253
253
  name: webrick
254
254
  requirement: !ruby/object:Gem::Requirement
@@ -416,7 +416,6 @@ files:
416
416
  - app/models/metasploit_data_models/search/visitor/method.rb
417
417
  - app/models/metasploit_data_models/search/visitor/relation.rb
418
418
  - app/models/metasploit_data_models/search/visitor/where.rb
419
- - config/initializers/arel_helper.rb
420
419
  - config/initializers/ipaddr.rb
421
420
  - config/locales/en.yml
422
421
  - console_db.yml
@@ -685,6 +684,7 @@ files:
685
684
  - spec/dummy/config/initializers/wrap_parameters.rb
686
685
  - spec/dummy/config/locales/en.yml
687
686
  - spec/dummy/config/routes.rb
687
+ - spec/dummy/config/storage.yml
688
688
  - spec/dummy/db/structure.sql
689
689
  - spec/dummy/db/structure.sql.from_rails_3
690
690
  - spec/dummy/lib/assets/.gitkeep
metadata.gz.sig CHANGED
Binary file
@@ -1,5 +0,0 @@
1
- # Including arel-helpers in all active record models.
2
- # https://github.com/camertron/arel-helpers
3
-
4
- ApplicationRecord.send(:include, ArelHelpers::ArelTable)
5
- ApplicationRecord.send(:include, ArelHelpers::JoinAssociation)