Package: last-will
last_willlast_will is a program that allows you to send an encrypted file with private information (passwords, PIN numbers etc) to a predesignated recipient, in case of your untimely death.The recipient needs to have a PGP Public/Private key pair. The file is encrypted with the recipient's Public Key and that ensures that only them can decrypt it and read the contents. The file can be in any format (doc, pdf, txt, etc).The intended usage is as a stand-alone utility and not as a library to import to other projects.SetupYou usually will want to installlast_willin a directory other thansite-packagesthat pip uses to install packages, for easy access.In order to do that, type:pip install -t <installation_dir> --no-deps last-will
pip install last-willFor example:pip install -t ~/last_will --no-deps last-will
pip install last-willThis actually installslast_willboth in the<installation_dir>and insite-packages, but it prevents the dependencies to be installed in the<installation_dir>.Note about TkinterThis program uses thetkinterlibrary to build the GUI. If you encounter an import error regardingtkinter, you need to install it on your system. Please try the following:For MacOSbrew install tcl-tkFor Ubuntusudo apt-get install tk-devpynevPlease note that if you're usingpyenvyou may encounter version incompatibility issues withtkinter. It is recommended that you uselast_willwith your system version of Python. If you're interested in makingtkinterwork withpyenvhave a look at this thread:https://github.com/pyenv/pyenv/issues/1375UsageTo open the GUI, first navigate to the folder:cd <installation_dir>/last_willand then run:python3 last_will.pyAfter you fill out the necessary information, run the scheduler (while in the same folder):python3 schedule_cron.pyWhen you need to check in every month, simply navigate to the above folder and open the GUI in the same way. If you don't want to change anything, simply clickQuit, otherwise update the information you want, clickUpdateand thenQuit.Below you'll find more details on the usage and scheduling.How it worksThe concept is simple.You create a file where you include information that a trusted person will need in case of your untimely death.IMPORTANT: For security reasons, it is highly recommended that you don't keep this (unencrypted) file on your computerYou coordinate with a close friend or relative who will be the recipient of this file and they provide you with their PGP Public key.last_willwill encrypt your file with this Public key, ensuring that only them can read it.Then you givelast_willall the necessary information (like recipient's email, your email, the public key file etc) and forget about it. Every 30 days you will receive an email (and optionally a text message) asking you to check in. In that case all you need to do is runlast_will.To do that, open terminal and type:cd <installation_dir>/last_will
python3 last_will.pyIf you don't check in within 24 hours after you receive the warning, the file will be sent to the recipient, since it's assumed you have left this vain world.All the recipient needs to do then is decrypt the file with their Private key and read the information you left for them.GUIlast_willcomes with a GUI to enter all the necessary information.Name to appear as sender:This is the name that will appear to the recipient as the sender of the emailRecipient's email:The email where the private information will be sentEmail subject:The subject of the emailUnencrypted message:A message you might want to add in plain text to accompany your file. This message will appear in the email's body.File to encrypt:The file that contains your private information.Recipient's PUBLIC key:An .asc file that contains the recipient's PGP Public key.Email to send from:The email address used to send the email. It's a good idea to set up an email account specifically for this purpose.Email's password:The password to that email. If you have enabled 2FA you will need a token instead of your usual password. Also, for Gmail (and perhaps other providers)you need to allow insecure apps, otherwise the email won't be sent.Your email:The email to which you wish to receive the notification to check inFill out the following if you have a Twilio account.Your phone number:You will receive a text message to this phone number when it's time to check in. If your Twilio account if free, you'll need to verify this number in order to be able to receive messages.Your Twilio phone number:The phone number of your Twilio account.Your Twilio account ID:Your Twilio account IDYour Twilio Auth token:Your Twilio Auth tokenOnce all the information is filled out click onUpdate. The encrypted file and all the information you filled out will be stored in a/filesfolder, inside the package folder.SchedulingThe command that needs to be run daily to check whether you need to check in is:cd <installation_dir>/last_will && python3 check_in.pyThere's ascedule_cron.pyscript which you can use (on Linux and macOS) to create a cron job that will do that for you.Firstmake sure you navigate to the folder:cd <installation_dir>/last_willand then run:python3 schedule_cron.pyYou can use the following optional parameters:-s, --shellIf you want cron to run in a different shell than the default (/bin/sh)-p, --pathIf you want to set a custom PATH for cron. Cron runs with an empty Path basically (/usr/bin:/bin)-m, --mailtoYou can set this to""so that cron doesn't send you mails. Or you can set a different user on your machine. The default location is/var/mail.
It is recommended that you leave that option to default and check the messages periodically (especially after the first use) to ensure that everything is working as expected.-t, --timeThe time you want the script to run every day. It must be in formatHH:MM. The default is 12:00.-d, --displayDisplay the current configuration and cron jobs (equivalent tocronjob -l)-r, --removeDelete the job.If you don't use this script then you need to schedule in some other way forcheck_in.pyto run every day from the above folder, otherwise the whole thing won't workThe computer needs to be running (and not in sleep mode) when the cron job is scheduled to run, otherwise it won't run for that day. Setting up the program on a computer that's always on or on a local server is a good idea (although you need to consider security, as sensitive information, eg. the email password, are stored locally)Alternatively you can schedule an event to wake-up your computer daily on the time you've set the cron job. For a laptop (on MacOS at least), the lid needs to be open for the event to run.SecurityThe original (unencrypted) file should not be kept on your computer.Ideally you should delete it after it's encrypted and empty the Trash. If you think you might need to make changes in the future, keep it on a USB drive that's used specifically for that purpose and hide it somewhere safe.It's also not a good idea to keep all your eggs in one basket, even if the file is encrypted. Give information that alone can't give access to something.For example, the password to your safe also requires access to the safe itself. Your master password for your password manager probably also requires an additional Secret Key and 2FA, which can be kept in your safe and on your phone respectively. Your computer password is useless without the computer and same goes for your phone's PIN.On the other hand, don't include cryptocurrency Private Keys or seeds, for example. Put these in a safe or bank vault and tell them how to access them.IMPORTANT:Keep in mind that the credentials to your email and Twilio account are stored in plain text. Unfortunately they can't be encrypted because thencheck_in.pywouldn't be able to access them and send the emails and text message automatically. So make sure that your computer is free of malware. If you don't feel comfortable storing this information on your computer,don't use this program!DisclaimerPlease make sure you understand how this program works and the security risks involved. I can't be held responsible if your private information or credentials fall into the wrong hands!