@@ -199,11 +199,11 @@ def show_command
199
199
# This method tries to identify the correct version of the pre-shipped
200
200
# JtR binaries to use based on the platform.
201
201
#
202
- # @return [NilClass] if the correct bianry could not be determined
202
+ # @return [NilClass] if the correct binary could not be determined
203
203
# @return [String] the path to the selected binary
204
204
def select_shipped_binary
205
205
cpuinfo_base = ::File . join ( Msf ::Config . data_directory , "cpuinfo" )
206
- runpath = nil
206
+ run_path = nil
207
207
if File . directory? ( cpuinfo_base )
208
208
data = nil
209
209
@@ -215,11 +215,11 @@ def select_shipped_binary
215
215
end
216
216
case data
217
217
when /sse2/
218
- run_path ||= " run.win32.sse2/ john.exe"
218
+ run_path ||= :: File . join ( Msf :: Config . data_directory , "john" , " run.win32.sse2" , " john.exe")
219
219
when /mmx/
220
- run_path ||= " run.win32.mmx/ john.exe"
220
+ run_path ||= :: File . join ( Msf :: Config . data_directory , "john" , " run.win32.mmx" , " john.exe")
221
221
else
222
- run_path ||= " run.win32.any/ john.exe"
222
+ run_path ||= :: File . join ( Msf :: Config . data_directory , "john" , " run.win32.any" , " john.exe")
223
223
end
224
224
when /x86_64-linux/
225
225
fname = "#{ cpuinfo_base } /cpuinfo.ia64.bin"
@@ -229,9 +229,9 @@ def select_shipped_binary
229
229
end
230
230
case data
231
231
when /mmx/
232
- run_path ||= " run.linux.x64.mmx/ john"
232
+ run_path ||= :: File . join ( Msf :: Config . data_directory , "john" , " run.linux.x64.mmx" , " john")
233
233
else
234
- run_path ||= " run.linux.x86.any/ john"
234
+ run_path ||= :: File . join ( Msf :: Config . data_directory , "john" , " run.linux.x86.any" , " john")
235
235
end
236
236
when /i[\d ]86-linux/
237
237
fname = "#{ cpuinfo_base } /cpuinfo.ia32.bin"
@@ -241,15 +241,15 @@ def select_shipped_binary
241
241
end
242
242
case data
243
243
when /sse2/
244
- run_path ||= " run.linux.x86.sse2/ john"
244
+ run_path ||= :: File . join ( Msf :: Config . data_directory , "john" , " run.linux.x86.sse2" , " john")
245
245
when /mmx/
246
- run_path ||= " run.linux.x86.mmx/ john"
246
+ run_path ||= :: File . join ( Msf :: Config . data_directory , "john" , " run.linux.x86.mmx" , " john")
247
247
else
248
- run_path ||= " run.linux.x86.any/ john"
248
+ run_path ||= :: File . join ( Msf :: Config . data_directory , "john" , " run.linux.x86.any" , " john")
249
249
end
250
250
end
251
251
end
252
- runpath
252
+ run_path
253
253
end
254
254
255
255
0 commit comments