Error Solving: Must be run on a terminal

Error Solving: Must be run on a terminal

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

要查看或添加评论,请登录

Gopalsamy R.的更多文章

社区洞察

其他会员也浏览了