metasploit-model 4.0.3 → 4.0.6

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: 4391972a69c6f80ed2aa061710505bf8de78e9f13f8b7e708251502e61b0d84b
4
- data.tar.gz: 7e783408df01d2427107fac62ab398e03230be44a5514950f9937a1acc749b61
3
+ metadata.gz: ffa2933ff7572b427a72c46792c11534a1ee454ef3285217daae29d304b6d18b
4
+ data.tar.gz: b6ebfcf7430e8af1a0471ae58bd413bf11af2686370ac4570323f086395c2bd0
5
5
  SHA512:
6
- metadata.gz: f5c1ff354b848fa043f02810a34d2d6dfdf4135cb39326405d5f16d337973602f5f64093061abcfb8f2a9483b6ff945adcdb70c514900d7d5eb45920f9e41652
7
- data.tar.gz: fd3b71ed9debbfba6c73d4012e1ef284f4fc056661d2288328ce0816b80cfb1fef7a8e35797b0e6d1fcb6720fa9e9b5335dab51cde4fefb785a7031f37abb744
6
+ metadata.gz: 4b127c19fa8b011dbf6fb131dc904dfc2ed94dbe02418248fc2059e56703aca823fa7707673011124329c0f70663ce68b0dad9a501b70708f578088cf8d324e6
7
+ data.tar.gz: 9a14a9fa4df85f47e151f97bc9f80923146ae1cd8f3e8996cb8fc221b3a3cdad3020b3e2069e6138e42c3b033be4d3acd1be4a4837b843b4ee843d7f729057dc
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,5 +1,21 @@
1
1
  name: Verify
2
2
 
3
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
4
+ permissions:
5
+ actions: none
6
+ checks: none
7
+ contents: none
8
+ deployments: none
9
+ id-token: none
10
+ issues: none
11
+ discussions: none
12
+ packages: none
13
+ pages: none
14
+ pull-requests: none
15
+ repository-projects: none
16
+ security-events: none
17
+ statuses: none
18
+
3
19
  on:
4
20
  push:
5
21
  branches:
@@ -10,7 +26,7 @@ on:
10
26
 
11
27
  jobs:
12
28
  test:
13
- runs-on: ubuntu-18.04
29
+ runs-on: ${{ matrix.os }}
14
30
  timeout-minutes: 40
15
31
 
16
32
  services:
@@ -30,15 +46,22 @@ jobs:
30
46
  fail-fast: true
31
47
  matrix:
32
48
  ruby:
33
- - 2.5
34
49
  - 2.6
35
50
  - 2.7
36
51
  - 3.0
52
+ - 3.1
53
+ os:
54
+ - ubuntu-18.04
55
+ - ubuntu-22.04
56
+ exclude:
57
+ - { os: ubuntu-22.04, ruby: 2.6 }
58
+ - { os: ubuntu-22.04, ruby: 2.7 }
59
+ - { os: ubuntu-22.04, ruby: 3.0 }
37
60
 
38
61
  env:
39
62
  RAILS_ENV: test
40
63
 
41
- name: Ruby ${{ matrix.ruby }}
64
+ name: ${{ matrix.os }} - Ruby ${{ matrix.ruby }}
42
65
  steps:
43
66
  - name: Install system dependencies
44
67
  run: sudo apt-get install graphviz
data/Gemfile CHANGED
@@ -3,6 +3,10 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in metasploit-model.gemspec
4
4
  gemspec
5
5
 
6
+ group :development do
7
+ gem 'pry-byebug'
8
+ end
9
+
6
10
  # used by dummy application
7
11
  group :development, :test do
8
12
  # supplies factories for producing model instance for specs
data/README.md CHANGED
@@ -22,9 +22,26 @@ Or install it yourself as:
22
22
 
23
23
  $ gem install metasploit-model
24
24
 
25
- ## Usage
25
+ ## Running tests
26
26
 
27
- TODO: Write usage instructions here
27
+ Copy the database configuration and modify as appropriate:
28
+
29
+ ```
30
+ cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
31
+ ```
32
+
33
+ Set up the database:
34
+
35
+ ```
36
+ bundle exec rake db:test:prepare
37
+ bundle exec rake db:migrate RAILS_ENV=test
38
+ ```
39
+
40
+ Run the test suite:
41
+
42
+ ```
43
+ bundle exec rspec
44
+ ```
28
45
 
29
46
  ## Contributing
30
47
 
@@ -36,6 +36,10 @@ module Metasploit::Model::Login::Status
36
36
  # When `Metasploit::Credential::Login#service` reports that `Metasploit::Credential::Login#core` are not correct.
37
37
  INCORRECT = 'Incorrect'
38
38
 
39
+ # When `Metasploit::Credential::Login#service` reports that `Metasploit::Credential::Login#core` has a public part
40
+ # that is verified as being invalid.
41
+ INVALID_PUBLIC_PART = 'Invalid Public Part'
42
+
39
43
  # When `Metasploit::Credential::Login#service` reports that account tied to `Metasploit::Credential::Login#core`
40
44
  # has had too many incorrect credentials attempted for authorization, so it is locked out to prevent bruteforce
41
45
  # guessing
@@ -59,10 +63,11 @@ module Metasploit::Model::Login::Status
59
63
  DENIED_ACCESS,
60
64
  DISABLED,
61
65
  INCORRECT,
66
+ INVALID_PUBLIC_PART,
62
67
  LOCKED_OUT,
63
68
  NO_AUTH_REQUIRED,
64
69
  SUCCESSFUL,
65
70
  UNABLE_TO_CONNECT,
66
71
  UNTRIED
67
72
  ]
68
- end
73
+ end
@@ -1,7 +1,7 @@
1
1
  module Metasploit
2
2
  module Model
3
3
  # VERSION is managed by GemRelease
4
- VERSION = '4.0.3'
4
+ VERSION = '4.0.6'
5
5
 
6
6
  # @return [String]
7
7
  #
@@ -32,14 +32,14 @@ RSpec.shared_examples_for 'Metasploit::Model::Search::Operator::Help' do
32
32
  backend.send(:init_translations)
33
33
  end
34
34
 
35
- translations_by_locale = I18n.backend.send(:translations)
35
+ translations_by_locale = I18n.backend.send(:translations).deep_dup
36
36
  english_translations = translations_by_locale.fetch(:en)
37
37
  metasploit_translations = english_translations.fetch(:metasploit)
38
- @metasploit_model_translations = metasploit_translations.fetch(:model)
38
+ metasploit_model_translations = metasploit_translations.fetch(:model)
39
39
 
40
- expect(@metasploit_model_translations).not_to have_key(:ancestors)
40
+ expect(metasploit_model_translations).not_to have_key(:ancestors)
41
41
 
42
- @metasploit_model_translations[:ancestors] = {
42
+ metasploit_model_translations[:ancestors] = {
43
43
  klass.model_name.i18n_key => {
44
44
  search: {
45
45
  operator: {
@@ -52,10 +52,8 @@ RSpec.shared_examples_for 'Metasploit::Model::Search::Operator::Help' do
52
52
  }
53
53
  }
54
54
  }
55
- end
56
55
 
57
- after(:example) do
58
- @metasploit_model_translations.delete(:ancestors)
56
+ allow(I18n.backend).to receive(:translations).and_return(translations_by_locale)
59
57
  end
60
58
 
61
59
  it 'should use #klass #i18n_scope to lookup translations specific to the #klass or one of its ancestors' do
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -93,7 +93,7 @@ cert_chain:
93
93
  EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
94
  9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
95
95
  -----END CERTIFICATE-----
96
- date: 2021-09-16 00:00:00.000000000 Z
96
+ date: 2022-08-02 00:00:00.000000000 Z
97
97
  dependencies:
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: metasploit-yard
metadata.gz.sig CHANGED
Binary file