We need an opensource Dead Man's switch

I posit, that for IT security, dealing with encrypted files that contain passwords for accounts, we need to have an opensource version of a Dead Man’s switch. Under normal circumstances, when a person draws up a Last Will and Testament, in the Appendix’s, are listed financial details including bank accounts, property notes and documents and nowaday’s other sensitive data. Normally, a Will is then filled with a lawyer, who keeps until your demize and then reads it to the beneficiaries of said Will. This is fine, if you can afford a lawyer, but what if you can’t? What if you have sensitive data as part of that Will that needs to get into the hands of the beneficiaries, such as a master password that is used to unlock a password vault, or the location of burried gold in your backyard? The potential for death is everywhere, at anytime, with no warning and when it happens, will you be able to pass on that information to your beneficiaries?

The most famous recent case of the use of a Dead Man’s Switch was Edward Snowden, during the time he was leaking data to the Guardian.

Edward Snowden has set up a dead man’s switch. He’s distributed encrypted copies of his document trove to various people, and has set up some sort of automatic system to distribute the key, should something happen to him.

Now, there is a Dead Man’s Switch on the internet but it is closed, private and untrustworthy. Also it is online on someone’s server, a completely unacceptable situation, but that is all which is available at the moment.


What I propose is that the coders of this community, get together and create a new Dead Man’s Switch, either in the form of a script/app that can run on your computer whereby you set a reminder time to “check in” and in the even of failure, it uses your existing mail setup like Thunderbird, to send an mail out to the people you have specified.

I think a script/app running at startup would be sufficient. But, upon starting it needs:

  1. interval check time (eg, every 1 day, 7 days, 14 days, 21 days, 30 days)
  2. optional backup interval check (means if the first check fails, do you want to wait for the next interval check to fail before sending)
  3. contents of the message you want to send to beneficiaries
  4. email addresses of said beneficiaries
  5. message needs to be encrypted on the computer to keep data secure

The progran or script should be written in a language that runs on Linux and Mac without the need to compile/make. Better still if starting with Linux, make into an AppImage for compatibility across systems.

I understand I am asking some people to collaborate and code a project on Git, but this would benefit potentially thousands of people.

For reference, some projects have been started but need to be modified:

This one uses Eth blockchain in the form a dApp

The more simple the better. Written in Python, or compile that into an AppImage.

If people are interested, please leave thoughts, opinions, and if you want to create this app or modify the above, please keep updates.

1 Like


Never worked on project like that so give me more data. i want more info about this dead man’s switch and i need other programmers to work with me about that. i will work with my python skills

What more data would you like?

I had a look at the code repo from https://github.com/h313/dead-mans-switch and it is almost complete BUT the author coded a condition into the sending module, “If the process is ended, this program assumes you’re dead and sends out the mssage.” This is what we do not want.

We want the system to check in with us at predetermined intervals to determine that we are still alive, and if those checkins fail, then it sends the message.

Example use scenario

  • I download the AppImage onto my Linux machine and run
  • Upon startup it confirms the current date
  • It then asks what interval i would like the DMS to check if I am still alive. I say every 2 weeks.
  • It asks for the passcode to verify my identity (any passcode is fine as only you know it)
  • It then proceeds for me to write the content of the message that will be sent to my email recipients
  • It then asks for the email addresses
  • Finally a confirmation prompt with your previously selected passcode. Then it starts to run in the background of your system polling the date using “cron”

I can shutdown the system no problem because upon boot, the program determines the current date and whether or not the interval date has been reached.

If today is the interval date that I selected, the program will open a terminal and prompt me to enter my passcode to verify that i am still alive (to allow for drunkeness or intoxication, you get 3 chances in case you make a mistake). After i enter the passcode the termanl window disappears until the next interval.

Some potential issues as the program is running on your computer.

This is why there is an argument to made to run this on your phone as an android apk, as you may not always have access to your computer but your phone most probably.

Now that’s fine if i am alive, but what if the peanut butter mafia got to me before then, what happens? What if my computer is turned off during the interval date?

Computer is turned off on interval date, turned on afterwards

  • the next time the computer is turned on, the app checks the date, determines that the date is passed and therefore prompts immediately for the passcode. If not entered it attempts to send the message.

The app can’t just blindly send the message if the computer is turned on after the interval date, that would be ridicuoous. There has to be a condition as mentioned above.

Considering the issue, it would be even better to have an app for your computer AND for your phone. But a phone app would be secondary.


Well, my problem until now that i’m not sure use JS or Python

interval check time i could use with it python and type sort of file to keep check it it’s kinda easy
contents of the message you want to send to beneficiaries: same thing i could save it into file
email addresses of said beneficiaries: same as above
message needs to be encrypted on the computer to keep data secure: can use encryption lib at python

my only problem that how i will make it send emails ? after time ends it will send the email to people that user typed alright how i make the app do it ? i never worked with something like that — update okay nvm i found code i just need to see it and play with it to understand how it works and yeah start build the actual app by python

I was searching on Github, and there are fully functional mini mail servers that could be incorporated into the app. I think.

After the time is up, the interval, it will check in and ask again for the passcode. The message only is sent if there is a fail on the passcode entered.

This program runs under the assumption that we have a computer that is always ON. Like a Pi, with internet access.

Otherwise an Android app may be better

well i just got a working nice code to send email with subject now i need to see other options then add all together

Found this free mail server written in Java


Samples available https://github.com/javaee/javamail/releases/download/JAVAMAIL-1_6_2/javamail-samples.zip

in my code i will use gmail email :slight_smile: — and due i hate working with times (like really i hate it) it will be sort of passcode, you have 3 times to enter if its wrong then it will start to send emails, what you think ? ( i just want way to organize time, like okay it will add today’s time what about tomorrow ? what if today is 31 and tomorrow will be 1 but instead the app will make it 32 and to fix it i need add a lot of if statements so i need find a way to fix that or just yeah make it as passcode)

can you explain more, regarding the gmail and passcode?

Alright, so i made a working code that uses your email address and sending to others using smtp which its free in gmail and paid in protonmail, anyway we will not use localhosts or anything it will just take your login data, login by it and send emails there alright ? (html and plaintext) and passcord will be more like a script run whenever you open PC and asks you for password you added in first time you opened the script and it will give you 3 chances to add it right if you made it right then its you and you still alive but if you made it wrong the 3 times the emails and everything will start as you dead and its another one trying to access it but there is things like what if pc hacked or your child play with it so yes im trying to back to old plan that ask you every certain time it just i need to find a way to make it :joy: — if u have keybase or wire we can talk there because here will be messy

sounds good, i like it

i can deal with a throwaway gmail account for this :slight_smile:

okay just found another code to actually validate the date so yeah i need play with code again :joy: to tweak it for my case and i guess we ready to run our beta test :slight_smile:

good news i got all codes i need i just need now to add them all together so it will take more time :joy:

Great news mate. I was looking for a time function code and found this on Git

Hopefully you can use.

Take your time in testing. It’s fantastic that you’ve made so much progress so quickly. Great work, :slight_smile:

Looks it’s messy okay :joy:
everytime i keep think at idea to add all codes together some new idea come to my head and i get lost so lets take this as first look and of course we will change codes later but take this script as test for now: https://github.com/EsmailELBoBDev2/Dead-man-s-switch/blob/master/script.py

still did not took advantage of today’s date in file i mean imagine if user opened script again by wrong in same day right ? so still thinking about that part too xD — I’m getting new ideas every second :joy:

1 Like

I’m on Ubuntu 20.04lts with this error. File is in my HOME dir and has executing priv.

import-im6.q16: attempt to perform an operation not allowed by the security policy PS' @ error/constitute.c/IsCoderAuthorized/408. from: can't read /var/mail/email.mime.text from: can't read /var/mail/datetime ./dms.py: line 6: syntax error near unexpected token (’
./dms.py: line 6: `def add_day():’

On StackExchange there is a similar error discussed:

Do I need to have some relevant Python libraries installed?

Alternatively, why not just use “Sendmail” ?

from email.mime.text import MIMEText
from subprocess import Popen, PIPE

msg = MIMEText("Here is the body of my message")
msg["From"] = "me@example.com"
msg["To"] = "you@example.com"
msg["Subject"] = "This is the subject."
p = Popen(["/usr/sbin/sendmail", "-t", "-oi"], stdin=PIPE, universal_newlines=True)

On linux “Mailutils” would need to be installed

as answer said did you execute it with python3.8 script.py ? or maybe just maybe yes you need to install the library (i already use “send mail” import smtplib
from email.mime.text import MIMEText) but i assume it already shipped with python thats why i used it but try to install it tho and last note see the comments in code to login and add others emails i guess that error due you did not login and finally create date.txt file as same as place with the script AND finaly thing :joy: maybe you need run it in sudo ? because it say “attempt to perform an operation not allowed by the security policy” but try above first

UPDATES: i added some useful info in readme.md at github rep alright ?
i installed script on my android phone (my mom’s actually because my phone is sucks but does not matter) and all i literally did is typing pkg install python then pip install notify-run then pip install notify-run and you are ready to run my script actually i typed these info too in the readme file but i just mean thats all you need also you need look at comments in my code to customize it and login by your gmail to make it works then you are ready to go :slight_smile:

1 Like

awesome work Esmail

yeah, i did not sleep for 2 days because of that project :joy:

1 Like