fix gcc for shell_reverse_tcp payloads on ubuntu
parent
2331a610d6
commit
cd0161ada2
|
@ -93,7 +93,12 @@ class MetasploitModule < Msf::Exploit::Local
|
|||
|
||||
def upload_and_compile(path, data)
|
||||
upload "#{path}.c", data
|
||||
output = cmd_exec "gcc -o #{path} #{path}.c -lpthread"
|
||||
|
||||
gcc_cmd = "gcc -o #{path} #{path}.c -lpthread"
|
||||
if session.type.eql? 'shell'
|
||||
gcc_cmd = "PATH=$PATH:/usr/bin/ #{gcc_cmd}"
|
||||
end
|
||||
output = cmd_exec gcc_cmd
|
||||
|
||||
unless output.blank?
|
||||
print_error output
|
||||
|
|
Loading…
Reference in New Issue