Skip to content

Commit addecb6

Browse files
committed
Fix running shipped bins by using a config file
This should get everything working again. MSP-10817
1 parent 917d2c7 commit addecb6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/metasploit/framework/jtr/cracker.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ def crack_command
119119

120120
if config.present?
121121
cmd << ( "--config=" + config )
122+
else
123+
cmd << ( "--config=" + john_config_file )
122124
end
123125

124126
if pot.present?
@@ -162,6 +164,13 @@ def each_cracked_password
162164
end
163165
end
164166

167+
# This method returns the path to a default john.conf file.
168+
#
169+
# @return [String] the path to the default john.conf file
170+
def john_config_file
171+
::File.join( ::Msf::Config.data_directory, "john", "confs", "john.conf" )
172+
end
173+
165174
# This method returns the path to a default john.pot file.
166175
#
167176
# @return [String] the path to the default john.pot file
@@ -189,6 +198,8 @@ def show_command
189198

190199
if config
191200
cmd << "--config=#{config}"
201+
else
202+
cmd << ( "--config=" + john_config_file )
192203
end
193204

194205
cmd << hash_path

0 commit comments

Comments
 (0)