metasploit-credential 0.13.8 → 0.13.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/metasploit/credential/nonreplayable_hash.rb +1 -1
- data/lib/metasploit/credential/creation.rb +3 -1
- data/lib/metasploit/credential/version.rb +1 -1
- data/lib/metasploit/credential/version.rb.orig +49 -0
- data/spec/dummy/config/database.yml +14 -11
- data/spec/dummy/db/structure.sql +2 -0
- data/spec/dummy/db/structure.sql.orig +3699 -0
- data/spec/lib/metasploit/credential/creation_spec.rb +14 -1
- metadata +5 -2
@@ -23,9 +23,10 @@ describe Metasploit::Credential::Creation do
|
|
23
23
|
let(:hash) { FactoryGirl.create(:metasploit_credential_nonreplayable_hash) }
|
24
24
|
let(:origin) { FactoryGirl.create(:metasploit_credential_origin_manual) }
|
25
25
|
let(:password) { "omgwtfbbq" }
|
26
|
+
let(:realm) { FactoryGirl.create(:metasploit_credential_realm) }
|
26
27
|
|
27
28
|
let!(:old_core) do
|
28
|
-
FactoryGirl.create(:metasploit_credential_core, public: public, private: hash, workspace: workspace, origin: origin)
|
29
|
+
FactoryGirl.create(:metasploit_credential_core, public: public, private: hash, realm: realm, workspace: workspace, origin: origin)
|
29
30
|
end
|
30
31
|
|
31
32
|
it 'creates a Core' do
|
@@ -39,6 +40,18 @@ describe Metasploit::Credential::Creation do
|
|
39
40
|
expect(Metasploit::Credential::Private.last).to be_a Metasploit::Credential::Password
|
40
41
|
end
|
41
42
|
|
43
|
+
it 'replicates realm in new credential' do
|
44
|
+
expect {
|
45
|
+
core = test_object.create_cracked_credential(
|
46
|
+
core_id: old_core.id,
|
47
|
+
workspace_id: workspace.id,
|
48
|
+
username: public.username,
|
49
|
+
password: password
|
50
|
+
)
|
51
|
+
}.to change{Metasploit::Credential::Core.count}.by(1)
|
52
|
+
expect(Metasploit::Credential::Core.last.realm).to eq(realm)
|
53
|
+
end
|
54
|
+
|
42
55
|
context 'when previous core has logins' do
|
43
56
|
let(:host) { FactoryGirl.create(:mdm_host, workspace: workspace) }
|
44
57
|
let(:service) { FactoryGirl.create(:mdm_service, host: host) }
|
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: 0.13.
|
4
|
+
version: 0.13.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Imhoff
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: metasploit-concern
|
@@ -192,6 +192,7 @@ files:
|
|
192
192
|
- lib/metasploit/credential/origin.rb
|
193
193
|
- lib/metasploit/credential/text.rb
|
194
194
|
- lib/metasploit/credential/version.rb
|
195
|
+
- lib/metasploit/credential/version.rb.orig
|
195
196
|
- lib/tasks/databases.rake
|
196
197
|
- lib/tasks/yard.rake
|
197
198
|
- spec/dummy/README.rdoc
|
@@ -220,6 +221,7 @@ files:
|
|
220
221
|
- spec/dummy/config/locales/en.yml
|
221
222
|
- spec/dummy/config/routes.rb
|
222
223
|
- spec/dummy/db/structure.sql
|
224
|
+
- spec/dummy/db/structure.sql.orig
|
223
225
|
- spec/dummy/public/404.html
|
224
226
|
- spec/dummy/public/422.html
|
225
227
|
- spec/dummy/public/500.html
|
@@ -340,6 +342,7 @@ test_files:
|
|
340
342
|
- spec/dummy/config/locales/en.yml
|
341
343
|
- spec/dummy/config/routes.rb
|
342
344
|
- spec/dummy/db/structure.sql
|
345
|
+
- spec/dummy/db/structure.sql.orig
|
343
346
|
- spec/dummy/public/404.html
|
344
347
|
- spec/dummy/public/422.html
|
345
348
|
- spec/dummy/public/500.html
|