Skip to content

Commit fd7e65d

Browse files
David MaloneyDavid Maloney
authored andcommitted
derp just check db active
the other way of doing this was stupid, jsut check if the db is active
1 parent 001b6d9 commit fd7e65d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/msf/core/auxiliary/report.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,33 @@ module Auxiliary::Report
1313
optionally_include_metasploit_credential_creation
1414

1515
def create_cracked_credential(opts={})
16-
begin
16+
if active_db?
1717
super(opts)
18-
rescue NoMethodError => e
18+
else
1919
print_error "There does not appear to be a functioning DB, Credential Data will not be saved!"
2020
end
2121
end
2222

2323
def create_credential(opts={})
24-
begin
24+
if active_db?
2525
super(opts)
26-
rescue NoMethodError => e
26+
else
2727
print_error "There does not appear to be a functioning DB, Credential Data will not be saved!"
2828
end
2929
end
3030

3131
def create_credential_login(opts={})
32-
begin
32+
if active_db?
3333
super(opts)
34-
rescue NoMethodError => e
34+
else
3535
print_error "There does not appear to be a functioning DB, Credential Data will not be saved!"
3636
end
3737
end
3838

3939
def invalidate_login(opts={})
40-
begin
40+
if active_db?
4141
super(opts)
42-
rescue NoMethodError => e
42+
else
4343
print_error "There does not appear to be a functioning DB, Credential Data will not be saved!"
4444
end
4545
end

0 commit comments

Comments
 (0)