metasploit-model 4.0.2 → 4.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/verify.yml +5 -14
- data/Gemfile +4 -0
- data/README.md +19 -2
- data/lib/metasploit/model/login/status.rb +6 -1
- data/lib/metasploit/model/version.rb +1 -1
- data/spec/support/shared/examples/metasploit/model/search/operator/help.rb +5 -7
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b31bc4658a919c1518edede3a55ce7a248725a6092bbfc522b1f75d998b1cf5
|
4
|
+
data.tar.gz: ac9b1b17fd9099df515f4dfb214ba91cd4edbe45e93d012cfa5a55df0d8b129d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d9fdc24efd0c5975d72d63c5d08b6475cf714d637065eff3bb069d7576ad87b0bc7e1323669b7cf367c47aa534d66b6fe6fa6b8c4ef892a51168ec8f76b755d
|
7
|
+
data.tar.gz: 44780308cc675e3f0d615e3b230df4d3c40af27132deb4d74353785632fd702b6f4559e899a04ae7404c41204a1dbef45b2029e0d230eb42d98b67c156422671
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -10,7 +10,7 @@ on:
|
|
10
10
|
|
11
11
|
jobs:
|
12
12
|
test:
|
13
|
-
runs-on: ubuntu-
|
13
|
+
runs-on: ubuntu-18.04
|
14
14
|
timeout-minutes: 40
|
15
15
|
|
16
16
|
services:
|
@@ -30,10 +30,10 @@ jobs:
|
|
30
30
|
fail-fast: true
|
31
31
|
matrix:
|
32
32
|
ruby:
|
33
|
-
- 2.5
|
34
33
|
- 2.6
|
35
34
|
- 2.7
|
36
35
|
- 3.0
|
36
|
+
- 3.1
|
37
37
|
|
38
38
|
env:
|
39
39
|
RAILS_ENV: test
|
@@ -46,24 +46,15 @@ jobs:
|
|
46
46
|
- name: Checkout code
|
47
47
|
uses: actions/checkout@v2
|
48
48
|
|
49
|
-
-
|
49
|
+
- name: Setup Ruby
|
50
|
+
uses: ruby/setup-ruby@v1
|
50
51
|
with:
|
51
52
|
ruby-version: ${{ matrix.ruby }}
|
52
|
-
|
53
|
-
- name: Setup bundler
|
54
|
-
run: |
|
55
|
-
gem install bundler
|
56
|
-
|
57
|
-
- name: Bundle install
|
58
|
-
run: |
|
59
|
-
bundle config path vendor/bundle
|
60
|
-
bundle install --jobs 4 --retry 3
|
53
|
+
bundler-cache: true
|
61
54
|
|
62
55
|
- name: Test
|
63
56
|
run: |
|
64
|
-
gem install bundler
|
65
57
|
cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
|
66
|
-
bundle install
|
67
58
|
bundle exec rake --version
|
68
59
|
bundle exec rake db:test:prepare
|
69
60
|
|
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
|
-
##
|
25
|
+
## Running tests
|
26
26
|
|
27
|
-
|
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
|
@@ -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
|
-
|
38
|
+
metasploit_model_translations = metasploit_translations.fetch(:model)
|
39
39
|
|
40
|
-
expect(
|
40
|
+
expect(metasploit_model_translations).not_to have_key(:ancestors)
|
41
41
|
|
42
|
-
|
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
|
-
|
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.
|
4
|
+
version: 4.0.5
|
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:
|
96
|
+
date: 2022-06-17 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
|