If there's a system() or similar function in PHP like in C or Python, you can call /usr/bin/bash to create a full shell or just pass in the commands you would want to run in that shell.
If there's a system() or similar function in PHP like in C or Python, you can call /usr/bin/bash to create a full shell or just pass in the commands you would want to run in that shell.
Keep in mind that I know absolutely no PHP, nor do I even know if this function exists in that language...
C(++):
[code=c]
//This would need main()/etc
system("/usr/bin/bash");
[/code]
Python:
[code=python]
import os
os.system('/usr/bin/bash')
[/code]
Actually...you should probably use exec() or popen() (Google for how to use them, I'm not entirely certain), as system() under *nix passes the parameters passed to it to the shell as commands to be run rather than starting a new process.
Comment