Skip to content

Instantly share code, notes, and snippets.

@suplo
Created January 5, 2017 06:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suplo/c5d496f5c2e62c98b625efbfba11c0e4 to your computer and use it in GitHub Desktop.
Save suplo/c5d496f5c2e62c98b625efbfba11c0e4 to your computer and use it in GitHub Desktop.
Getting around "su: must be run from a terminal"

Solution to su: must be run from a terminal when working in reverse shell (PHP).

echo "import pty; pty.spawn('/bin/bash')" > /tmp/asdf.py
python /tmp/asdf.py

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment