0
I am trying to figure out how to manage my debian and make it to reload script in /etc/init.d if the remote, reverese connection is not responding
what I have at the moment is:
root@pwnpi:~# netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 512 10.28.4.115:34233 xx.xxx.xxx.xxx:31337 ESTABLISHED
and I would like to reload script /etc/init.d/reverseshell if this connection is not ESTABLISHED or LISTEN
Can anyone help with that?
The term "reboot" is usually taken to mean the entire system. Do you mean restarting a process (through its init script) based on some criteria? Please [edit] as appropriate to clarify. – a CVn – 2015-01-16T12:54:31.167
Maybe this item on UNIX & Linux SE answers your question? Also: what's the point in rebooting your computer when a networking connection is lost? If the datacenter has a networking outage (which shouldn't occur often), your server will continually reboot. It might be better just to restart the networking services... Finally: what have you already tried? Where are you stuck? SE is not a scripting service.
– agtoever – 2015-01-16T13:28:59.473I need to scan our internal network /12 this weekend and the solution I have (reverse shell) is failing on me every few hours. – Adam – 2015-01-16T14:32:14.477