metasploit-credential 5.0.0 → 5.0.4
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/app/models/metasploit/credential/core.rb +4 -1
- data/app/models/metasploit/credential/origin/import.rb +1 -0
- data/app/models/metasploit/credential/ssh_key.rb +1 -1
- data/lib/metasploit/credential/version.rb +1 -1
- data/spec/dummy/config/database.yml +2 -2
- data/spec/models/metasploit/credential/core_spec.rb +3 -3
- data/spec/models/metasploit/credential/origin/import_spec.rb +1 -1
- 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: e8c662ab01206eb5505e4547ea2d0d092ef9a5dcd53b3e3d7a3f0e24080bc080
|
4
|
+
data.tar.gz: 412d0c389cd2157da7e1594b4ed4f71cd97cd212673b52027a07fbb5dabbe266
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf857bc495a3084d6d092bcd47bcefc77774e40a681d299ab6e9f63249f1095dfb8c8c5938663bbf060720ad0fac7716bd30536581b821801e8278c3c618c7ba
|
7
|
+
data.tar.gz: b1296d879cfec2c95064f0fc38f46ab513cc7de077bfaeebd1c63a4b16383ec6b26a04a384eb95f180a4b419523e19a6864345c78cbd605f2901942fd68be97c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -52,6 +52,7 @@ class Metasploit::Credential::Core < ApplicationRecord
|
|
52
52
|
# @return [Metasploit::Credential::Private, nil]
|
53
53
|
belongs_to :private,
|
54
54
|
class_name: 'Metasploit::Credential::Private',
|
55
|
+
optional: true,
|
55
56
|
inverse_of: :cores
|
56
57
|
|
57
58
|
# @!attribute public
|
@@ -60,6 +61,7 @@ class Metasploit::Credential::Core < ApplicationRecord
|
|
60
61
|
# @return [Metasploit::Credential::Public, nil]
|
61
62
|
belongs_to :public,
|
62
63
|
class_name: 'Metasploit::Credential::Public',
|
64
|
+
optional: true,
|
63
65
|
inverse_of: :cores
|
64
66
|
|
65
67
|
# @!attribute realm
|
@@ -69,6 +71,7 @@ class Metasploit::Credential::Core < ApplicationRecord
|
|
69
71
|
# @return [Metasploit::Credential::Realm, nil]
|
70
72
|
belongs_to :realm,
|
71
73
|
class_name: 'Metasploit::Credential::Realm',
|
74
|
+
optional: true,
|
72
75
|
inverse_of: :cores
|
73
76
|
|
74
77
|
# @!attribute workspace
|
@@ -205,7 +208,7 @@ class Metasploit::Credential::Core < ApplicationRecord
|
|
205
208
|
scope :originating_host_id, ->(host_id) {
|
206
209
|
where(
|
207
210
|
Metasploit::Credential::Core[:id].in(
|
208
|
-
|
211
|
+
self.cores_from_host(host_id)
|
209
212
|
)
|
210
213
|
)
|
211
214
|
}
|
@@ -110,7 +110,7 @@ class Metasploit::Credential::SSHKey < Metasploit::Credential::Private
|
|
110
110
|
begin
|
111
111
|
openssl_pkey_pkey
|
112
112
|
rescue ArgumentError, OpenSSL::PKey::PKeyError => error
|
113
|
-
errors
|
113
|
+
errors.add(:data, "#{error.class} #{error}")
|
114
114
|
end
|
115
115
|
end
|
116
116
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
development: &pgsql
|
2
2
|
adapter: postgresql
|
3
|
-
database: metasploit-
|
3
|
+
database: metasploit-credential_development0
|
4
4
|
username: msf
|
5
5
|
password: pass123
|
6
6
|
host: localhost
|
@@ -10,4 +10,4 @@ development: &pgsql
|
|
10
10
|
min_messages: warning
|
11
11
|
test:
|
12
12
|
<<: *pgsql
|
13
|
-
database: metasploit-
|
13
|
+
database: metasploit-credential_test0
|
@@ -72,9 +72,9 @@ RSpec.describe Metasploit::Credential::Core, type: :model do
|
|
72
72
|
it { is_expected.to have_and_belong_to_many(:tasks).class_name('Mdm::Task') }
|
73
73
|
it { is_expected.to have_many(:logins).class_name('Metasploit::Credential::Login').dependent(:destroy) }
|
74
74
|
it { is_expected.to belong_to(:origin) }
|
75
|
-
it { is_expected.to belong_to(:private).class_name('Metasploit::Credential::Private') }
|
76
|
-
it { is_expected.to belong_to(:public).class_name('Metasploit::Credential::Public') }
|
77
|
-
it { is_expected.to belong_to(:realm).class_name('Metasploit::Credential::Realm') }
|
75
|
+
it { is_expected.to belong_to(:private).optional.class_name('Metasploit::Credential::Private') }
|
76
|
+
it { is_expected.to belong_to(:public).optional.class_name('Metasploit::Credential::Public') }
|
77
|
+
it { is_expected.to belong_to(:realm).optional.class_name('Metasploit::Credential::Realm') }
|
78
78
|
it { is_expected.to belong_to(:workspace).class_name('Mdm::Workspace') }
|
79
79
|
end
|
80
80
|
|
@@ -3,7 +3,7 @@ RSpec.describe Metasploit::Credential::Origin::Import, type: :model do
|
|
3
3
|
|
4
4
|
context 'associations' do
|
5
5
|
it { is_expected.to have_many(:cores).class_name('Metasploit::Credential::Core').dependent(:destroy) }
|
6
|
-
it { is_expected.to belong_to(:task).class_name('Mdm::Task') }
|
6
|
+
it { is_expected.to belong_to(:task).optional.class_name('Mdm::Task') }
|
7
7
|
end
|
8
8
|
|
9
9
|
context 'database' do
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit-credential
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.4
|
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-
|
96
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: metasploit-concern
|
metadata.gz.sig
CHANGED
Binary file
|