Zip file to store passwords Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
roysubs
Posts: 428
Joined: 29 Sep 2018, 16:37

Zip file to store passwords

08 Nov 2021, 05:48

I would like to have an plain text file on my hard disk that holds some information that I want to secure, so I would like it to be zipped up in a password protected zip file (this is more than enough security for my needs).
I would like the first time that I access this file when my AHK file is loaded to ask me for the password, and then hold onto that password in a variable for the duration of the AHK file being loaded such that it opens the zip file and can read / alter the text file that is in there (i.e. without creating a temp file ideally, read the file into memory and then write the file back into the zip file). After I restart my AHK script, I would need to re-input the password the first time.
Does anyone have some templates that could help get me started with doing this? Tasks like:
• Create a zip file from a text file
• Opening the zip file, request password, then hold that password for all subsequent access
• Read contents of file inside zip file into memory, then modify it as required, then update the file into the zip file
User avatar
mikeyww
Posts: 26986
Joined: 09 Sep 2014, 18:38

Re: Zip file to store passwords  Topic is solved

08 Nov 2021, 05:58

This may help. http://www.autohotkey.com/forum/viewtopic.php?t=65401

7zip is also handy. https://www.7-zip.org/

InputBox could ask the user for a password. It has a "Hide" parameter that is useful for passwords.

I use Total Commander to manage files, and I think that it more or less does all of what you described, though of course, any modification to the file's contents are done by the user. I do not know whether temporary files are created, but I imagine so.
roysubs
Posts: 428
Joined: 29 Sep 2018, 16:37

Re: Zip file to store passwords

08 Nov 2021, 07:18

I use 7zip for most things yes, and ok, I'll look at the Hide parameter, thanks.

You mean you use Total Commander for tasks like this manually, or you mean that you automate Total Commander functions from AutoHotkey? I'd be interested to see how that works.
User avatar
mikeyww
Posts: 26986
Joined: 09 Sep 2014, 18:38

Re: Zip file to store passwords

08 Nov 2021, 07:42

Just manually; it might not serve your purpose.

7zip has a robust command line. WinRAR does, too, but I believe that it comes with a fee.
Johnny R
Posts: 348
Joined: 03 Oct 2013, 02:07

Re: Zip file to store passwords

08 Nov 2021, 08:16

Perhaps fSekrit helps you. Its freeware and fine for my daily use...
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: Zip file to store passwords

09 Nov 2021, 03:27

You are basically trying to make a password manager, why not just use one of the already tried and tested password managers available? Personally I use keepass 2.
Please excuse my spelling I am dyslexic.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AlFlo, mikeyww and 70 guests