Add a switch for creating a cleanup rc file
parent
20708ebc82
commit
26e3ec0a5f
|
@ -51,6 +51,8 @@ class Metasploit4 < Msf::Exploit::Local
|
|||
[false, 'The name to use for storing the payload blob. (Default: random)' ]),
|
||||
OptString.new('RUN_NAME',
|
||||
[false, 'The name to use for the \'Run\' key. (Default: random)' ]),
|
||||
OptBool.new('CREATE_RC',
|
||||
[false, 'Create a resource file for cleanup', true]),
|
||||
], self.class)
|
||||
end
|
||||
|
||||
|
@ -181,7 +183,9 @@ class Metasploit4 < Msf::Exploit::Local
|
|||
print_status('Installing run key')
|
||||
install_cmd(cmd, cmd_reg, root_path)
|
||||
|
||||
create_cleanup(root_path, blob_reg_key, blob_reg_name, cmd_reg, new_key)
|
||||
if datastore['CREATE_RC']
|
||||
create_cleanup(root_path, blob_reg_key, blob_reg_name, cmd_reg, new_key)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue