Skip to content

Commit ed74271

Browse files
committed
Land rapid7#4548, @dmaloney-r7's fix to allow loginscanners to work w/o a DB
2 parents 50ecfbf + 98cee82 commit ed74271

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

lib/msf/core/auxiliary/report.rb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,38 @@ module Auxiliary::Report
1212

1313
optionally_include_metasploit_credential_creation
1414

15+
def create_cracked_credential(opts={})
16+
if active_db?
17+
super(opts)
18+
else
19+
vprint_warning('No active DB -- Credential data will not be saved!')
20+
end
21+
end
22+
23+
def create_credential(opts={})
24+
if active_db?
25+
super(opts)
26+
else
27+
vprint_warning('No active DB -- Credential data will not be saved!')
28+
end
29+
end
30+
31+
def create_credential_login(opts={})
32+
if active_db?
33+
super(opts)
34+
else
35+
vprint_warning('No active DB -- Credential data will not be saved!')
36+
end
37+
end
38+
39+
def invalidate_login(opts={})
40+
if active_db?
41+
super(opts)
42+
else
43+
vprint_warning('No active DB -- Credential data will not be saved!')
44+
end
45+
end
46+
1547
# This method overrides the method from Metasploit::Credential to check for an active db
1648
def active_db?
1749
framework.db.active

0 commit comments

Comments
 (0)