handle drive letters specified like E: nicely

bug/bundler_fix
Brent Cook 2017-08-03 00:27:22 -05:00
parent a12f3c4c23
commit b62429f6fa
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class MetasploitModule < Msf::Exploit::Remote
print_status("#{dll_path} created, copy it to the root folder of the target USB drive")
if datastore['DRIVE']
lnk = generate_link("#{datastore['DRIVE']}:\\#{dll_name}")
lnk = generate_link("#{datastore['DRIVE'].split(':')[0]}:\\#{dll_name}")
lnk_filename = datastore['FILENAME'] || "#{rand_text_alpha(16)}.lnk"
lnk_path = store_file(lnk, lnk_filename)
print_status("#{lnk_path} created, copy to the target USB drive")