See the maintained version at codeberg.org
Script to detect or close possibles reverse shell's running on your system
Clone the raw file of the script
wget https://raw.githubusercontent.com/nothingbutlucas/anti_reverse_shell/main/anti_reverse_shell.sh -P ~/.local/bin/
And then add a cron to your system
crontab -e
* * * * * ~/.local/bin/anti_reverse_shell.sh
If the script is on your path, you can directly execute it:
anti_reverse_shell.sh