0

So here is what i want to do : I have a lua script here is the code

if ( i == "1" ) 
    then
        io.write("Please provide the PHP reverse shell path : ")
        local rev_shell_path = io.read()
        local hex_edit = os.execute("hexeditor " .. rev_shell_path )
        local sendkeys = os.execute("python3 src/sendkeys.py")
    end

the job of this code is to run hexedit and then run a python script which uses pyautogui to send some keys which are needed to automate the task of editing the hex codes. the problem here that for sendkeys.py script to run hexeditor must end or get killed. How can i run them at the same time without ending hexeditor ?

  • Possible duplocate: https://stackoverflow.com/questions/9480315/lua-multiple-concurrent-processes The thing that I figure best suits your use case is `os.spawn` which is what the accepted answer from that link says. – Jerry Jeremiah Mar 16 '22 at 08:02
  • `os.execute("hexeditor " .. rev_shell_path .. " &")` – Egor Skriptunoff Mar 16 '22 at 11:46
  • 1
    Does this answer your question? [Lua multiple concurrent processes](https://stackoverflow.com/questions/9480315/lua-multiple-concurrent-processes) – James Brown Mar 16 '22 at 13:18
  • It throws this error (module 'ex' not found) –  Mar 16 '22 at 13:52

0 Answers0