metasploit-credential 0.8.9 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/metasploit/credential/creation.rb +4 -4
- data/lib/metasploit/credential/version.rb +2 -2
- data/spec/dummy/log/development.log +10 -0
- data/spec/dummy/log/test.log +41395 -0
- data/spec/lib/metasploit/credential/creation_spec.rb +12 -31
- metadata +2 -2
@@ -499,32 +499,23 @@ describe Metasploit::Credential::Creation do
|
|
499
499
|
|
500
500
|
context 'when an untried login exists' do
|
501
501
|
let(:untried_login) { FactoryGirl.create(:metasploit_credential_login, status: Metasploit::Model::Login::Status::UNTRIED)}
|
502
|
-
|
502
|
+
|
503
|
+
let(:opts) {{
|
504
|
+
address: untried_login.service.host.address,
|
505
|
+
port: untried_login.service.port,
|
506
|
+
protocol: untried_login.service.proto,
|
507
|
+
username: untried_login.core.public.username,
|
508
|
+
private_data: untried_login.core.private.data,
|
509
|
+
realm_key: untried_login.core.realm.try(:key),
|
510
|
+
realm_value: untried_login.core.realm.try(:value),
|
511
|
+
status: Metasploit::Model::Login::Status::INCORRECT
|
512
|
+
}}
|
513
|
+
|
503
514
|
it 'sets the supplied status on that login' do
|
504
|
-
opts = {
|
505
|
-
address: untried_login.service.host.address,
|
506
|
-
port: untried_login.service.port,
|
507
|
-
protocol: untried_login.service.proto,
|
508
|
-
public: untried_login.core.public.username,
|
509
|
-
private: untried_login.core.private.data,
|
510
|
-
realm_key: untried_login.core.realm.try(:key),
|
511
|
-
realm_value: untried_login.core.realm.try(:value),
|
512
|
-
status: Metasploit::Model::Login::Status::INCORRECT
|
513
|
-
}
|
514
515
|
expect{ test_object.invalidate_login(opts) }.to change{untried_login.reload.status}.from(Metasploit::Model::Login::Status::UNTRIED).to(Metasploit::Model::Login::Status::INCORRECT)
|
515
516
|
end
|
516
517
|
|
517
518
|
it 'changes the last_attempted_at timestamp' do
|
518
|
-
opts = {
|
519
|
-
address: untried_login.service.host.address,
|
520
|
-
port: untried_login.service.port,
|
521
|
-
protocol: untried_login.service.proto,
|
522
|
-
public: untried_login.core.public.username,
|
523
|
-
private: untried_login.core.private.data,
|
524
|
-
realm_key: untried_login.core.realm.try(:key),
|
525
|
-
realm_value: untried_login.core.realm.try(:value),
|
526
|
-
status: Metasploit::Model::Login::Status::INCORRECT
|
527
|
-
}
|
528
519
|
expect{ test_object.invalidate_login(opts) }.to change{untried_login.reload.last_attempted_at}
|
529
520
|
end
|
530
521
|
|
@@ -547,16 +538,6 @@ describe Metasploit::Credential::Creation do
|
|
547
538
|
}
|
548
539
|
|
549
540
|
it 'updates the status on the correct login' do
|
550
|
-
opts = {
|
551
|
-
address: untried_login.service.host.address,
|
552
|
-
port: untried_login.service.port,
|
553
|
-
protocol: untried_login.service.proto,
|
554
|
-
public: untried_login.core.public.username,
|
555
|
-
private: untried_login.core.private.data,
|
556
|
-
realm_key: untried_login.core.realm.try(:key),
|
557
|
-
realm_value: untried_login.core.realm.try(:value),
|
558
|
-
status: Metasploit::Model::Login::Status::INCORRECT
|
559
|
-
}
|
560
541
|
expect{ test_object.invalidate_login(opts) }.to_not change{other_login.reload.status}
|
561
542
|
end
|
562
543
|
end
|
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.
|
4
|
+
version: 0.9.0
|
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: 2014-08-
|
12
|
+
date: 2014-08-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: metasploit-concern
|