Error Solving: Must be run on a terminal
Gopalsamy R.
Deputy Manager @ Protiviti India Member Firm | Information Security | Vulnerability Assessment | Penetration Testing | Cybersecurity | OWASP Cuddalore Chapter Leader
Hi myself Gopalsamy Rajendran, in this article we are going to discuss about a important error that we undergo while working on a reverse shell, most of us will get this error " Must be run from terminal " , there are two methods to get rid of that error,
First Method: using python to spawn a pty in your shell
- Type the following commands
echo "import pty; pty.spawn('/bin/bash')" > /tmp/anyname.py
- Now you need to run the file
python /tmp/filename.py
This command will helps you to get shell, but if there is no python on the target then use the second method which works most of the time.
Second Method:
- Type the following command
/usr/bin/script -qc /bin/bash /dev/null
This helps you to get the shell from the target system.
Hope it works thanks for reading. Do subscribe my youtube channel HackIsOn