Jump to content

Dead man's switch program


Cypher

Recommended Posts

Is their any computer programs that work's like a dead man's switch ? i mean lets say for example i have remote server in Canada and i am in new york and their is a huge power outage in new york and their is no way for me to get internet. Would their be away for me to have a program that would be on my remote server that would after lets say 2 days of me not connecting to it would send out a email to people i want like friends telling them they can not connect to this server right now because of unknown reasons then shut it self down till i actual go their and turn it back on or do any other things i program it to do ?

I just wanna know because i think it would be cool to have that for a server i have in my place.

Link to comment
Share on other sites

Is their any computer programs that work's like a dead man's switch ? i mean lets say for example i have remote server in Canada and i am in new york and their is a huge power outage in new york and their is no way for me to get internet. Would their be away for me to have a program that would be on my remote server that would after lets say 2 days of me not connecting to it would send out a email to people i want like friends telling them they can not connect to this server right now because of unknown reasons then shut it self down till i actual go their and turn it back on or do any other things i program it to do ?

I just wanna know because i think it would be cool to have that for a server i have in my place.

Well depending on the OS, you could create either a cron job or windows task and then have it set to go off every 2 days, then you could just login and reset it each time you login, Have a script that deletes it, then regenerates it at a 2 day interval. Then, when you don't show up, we'll assume your dead and take over your server your server will shut down. You can also add a script to email people like you said. Shouldn't be too hard to do.

Link to comment
Share on other sites

well start with a socket that connects to said computer making this a service or a deamon would probly be best

basicly have it constanty check for a connection and when the connection != NULL or INVALID then start a timer when the timer == 24hrs or something WinExec a python script or something similar...the concept is really simple and i dont think ive ever heard of such an idea Good Work

Link to comment
Share on other sites

I would just make a simple program to ping it every 2 days, or any other interval for that matter, then send out the email if the ping is not successful. I would probably do it in Python, but im not sure what the actual code would be, probably would be extremely simple however.

Link to comment
Share on other sites

You could even make something in PHP and then have your browser open it as the home page, so every time you go online, it resets the server.

-or just for fun if someone can get it working - I think Digininja was working on some code that used twitter as a way to send commands to another machine, so this might be something to look into, If you have a cell phone with internet access, you can set up something to send messages to sites like twitter. Have a special twitter account just so you can sms or post on every day with a word or special phrase. The script on your server checks to see the date and special word in the last post from your twitter account rss feed. If date is current and word == true, reset timer. If date is older than 2 days, countdown to dead man switch. Maybe a bit overkill, but hell, thats part of the fun to get it working. Even have phrases that just says, "shutdown", one for "reboot", oe whatever you want to do.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...