This completely misses the point of a dead man's switch. When the password prompt comes up, it will stick around forever waiting for input, and only ever send the email if someone enters three incorrect passwords. There's a bunch of other issues with the code too, but that one overshadows them all.
Did you upload release assets that don't correspond to the code in Git? Because that change isn't in the repo history.
Also, have you tested that code to make sure it actually sends the email? Because it looks to me like it doesn't actually work (specifically, that getpass.getpass will still block until the first incorrect password is entered).
Anyway, here's one of the other major problems: since this runs as the logged-in user, anyone else at the computer can just press Ctrl+C or Ctrl+\, open another terminal and "kill -9" the Python process, etc. (And if you're not worried about someone else being at the computer, then why have the password at all?)
Not sure. I am new to Github. I just made a new release found above.
I have tested the email. It works, provided you enter the correct server settings.
CTRL+C is disabled.
CTRL+\ not but i can add that in a future release
You assume, that the person who attacks you while you are at the machine, knows linux commands. I don't.
This is a work in progress. I am only a beginner programmer. Just trying to create something that might be useful to people.
The next iteration of this is to make a Dead Switch based website. I am already thinking about this as it will bypass a lot of issues, like someone being there at the computer.
If you're just a beginner programmer, turning this into a website where you invite non-technical people to trust you to handle this reliably seems like a bad idea. I'm not saying that you shouldn't build it, just please don't advertise it as a service that you run until you've got a lot more experience under your belt.
A modified version of this Dead Switch, written in PHP to run on someone's own server as a private service.
I do not intend to make this a public service where people would signup. Everyone who is interested can download the code from Github or Codeberg, and setup on their own server, configure it how they want, and it is only used for them, no one else.
Beginner programmers need to start somewhere. To wait until a person is "expert" and release code seems contrary to the whole notion of "hacking".
Also, the code is available publicly and opensource under GPL3. If you don't like it, fork it and modify it.