How can I encrypt/decrypt an Autohotkey ( .ahk ) file on the fly?












1















I use autohotkey to put different password combinations into different apps or devices I access. I also have an RSA token for additional authentication. Using an .ahk file is not very safe security wise, if anyone ever got access into my desktop that would have my password. So, I have found away around this. First I execute the .ahk file which allows it to run in the taskbar. After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. The issue is that every time I reboot the machine I have to do this. I am not being lazy, I want to know what a true solution is.
Is it possible to encypt/decrypt the .ahk file on the fly so that it is only able to be read by the hotkey and not by a human?



This is the closest I could find to a solution, but I don't understand the steps to actually implement it.



https://autohotkey.com/board/topic/4147-small-and-fast-text-file-encryptor/










share|improve this question

























  • Not familiar with AHK, but it sounds like you want an on-the-fly encryption tool like LUKS, eCryptfs, EncFS, etc. Wouldn't leave any un-encrypted files on the HD, etc

    – Xen2050
    Jul 23 '16 at 9:10











  • What's the difference between what you're doing and just compiling it with the source code permanently zipped/locked up somewhere else? Not that you can't decompile an exe but it sounds about the same as what you're doing now without the hassle. After the script is compiled to exe it just goes in your startup folder and runs on boot.

    – JJohnston2
    Jul 24 '16 at 4:24













  • I clarified a part above. "After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. "

    – DjIns1ght
    Jul 24 '16 at 16:42













  • So the issue here is that everytime I reboot the computer the file is zipped in the 7zip. I will have to unzip it and run the file to get it running in the taskbar again and then delete the file and 7zip it all over again. I want the autohotkey to decrypt and encrypt the .ahk file on the fly. It's not an .exe. It's an ahk file that contains text. It can be easily read by notepad.

    – DjIns1ght
    Jul 24 '16 at 16:50











  • Why would anyone vote this down? I don't understand how this site works. I am asking a legitimate question looking for a serious answer.

    – DjIns1ght
    Jul 25 '16 at 13:59
















1















I use autohotkey to put different password combinations into different apps or devices I access. I also have an RSA token for additional authentication. Using an .ahk file is not very safe security wise, if anyone ever got access into my desktop that would have my password. So, I have found away around this. First I execute the .ahk file which allows it to run in the taskbar. After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. The issue is that every time I reboot the machine I have to do this. I am not being lazy, I want to know what a true solution is.
Is it possible to encypt/decrypt the .ahk file on the fly so that it is only able to be read by the hotkey and not by a human?



This is the closest I could find to a solution, but I don't understand the steps to actually implement it.



https://autohotkey.com/board/topic/4147-small-and-fast-text-file-encryptor/










share|improve this question

























  • Not familiar with AHK, but it sounds like you want an on-the-fly encryption tool like LUKS, eCryptfs, EncFS, etc. Wouldn't leave any un-encrypted files on the HD, etc

    – Xen2050
    Jul 23 '16 at 9:10











  • What's the difference between what you're doing and just compiling it with the source code permanently zipped/locked up somewhere else? Not that you can't decompile an exe but it sounds about the same as what you're doing now without the hassle. After the script is compiled to exe it just goes in your startup folder and runs on boot.

    – JJohnston2
    Jul 24 '16 at 4:24













  • I clarified a part above. "After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. "

    – DjIns1ght
    Jul 24 '16 at 16:42













  • So the issue here is that everytime I reboot the computer the file is zipped in the 7zip. I will have to unzip it and run the file to get it running in the taskbar again and then delete the file and 7zip it all over again. I want the autohotkey to decrypt and encrypt the .ahk file on the fly. It's not an .exe. It's an ahk file that contains text. It can be easily read by notepad.

    – DjIns1ght
    Jul 24 '16 at 16:50











  • Why would anyone vote this down? I don't understand how this site works. I am asking a legitimate question looking for a serious answer.

    – DjIns1ght
    Jul 25 '16 at 13:59














1












1








1








I use autohotkey to put different password combinations into different apps or devices I access. I also have an RSA token for additional authentication. Using an .ahk file is not very safe security wise, if anyone ever got access into my desktop that would have my password. So, I have found away around this. First I execute the .ahk file which allows it to run in the taskbar. After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. The issue is that every time I reboot the machine I have to do this. I am not being lazy, I want to know what a true solution is.
Is it possible to encypt/decrypt the .ahk file on the fly so that it is only able to be read by the hotkey and not by a human?



This is the closest I could find to a solution, but I don't understand the steps to actually implement it.



https://autohotkey.com/board/topic/4147-small-and-fast-text-file-encryptor/










share|improve this question
















I use autohotkey to put different password combinations into different apps or devices I access. I also have an RSA token for additional authentication. Using an .ahk file is not very safe security wise, if anyone ever got access into my desktop that would have my password. So, I have found away around this. First I execute the .ahk file which allows it to run in the taskbar. After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. The issue is that every time I reboot the machine I have to do this. I am not being lazy, I want to know what a true solution is.
Is it possible to encypt/decrypt the .ahk file on the fly so that it is only able to be read by the hotkey and not by a human?



This is the closest I could find to a solution, but I don't understand the steps to actually implement it.



https://autohotkey.com/board/topic/4147-small-and-fast-text-file-encryptor/







security encryption autohotkey hotkeys






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 26 '16 at 14:10









mic84

2,30721817




2,30721817










asked Jul 22 '16 at 22:28









DjIns1ghtDjIns1ght

356




356













  • Not familiar with AHK, but it sounds like you want an on-the-fly encryption tool like LUKS, eCryptfs, EncFS, etc. Wouldn't leave any un-encrypted files on the HD, etc

    – Xen2050
    Jul 23 '16 at 9:10











  • What's the difference between what you're doing and just compiling it with the source code permanently zipped/locked up somewhere else? Not that you can't decompile an exe but it sounds about the same as what you're doing now without the hassle. After the script is compiled to exe it just goes in your startup folder and runs on boot.

    – JJohnston2
    Jul 24 '16 at 4:24













  • I clarified a part above. "After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. "

    – DjIns1ght
    Jul 24 '16 at 16:42













  • So the issue here is that everytime I reboot the computer the file is zipped in the 7zip. I will have to unzip it and run the file to get it running in the taskbar again and then delete the file and 7zip it all over again. I want the autohotkey to decrypt and encrypt the .ahk file on the fly. It's not an .exe. It's an ahk file that contains text. It can be easily read by notepad.

    – DjIns1ght
    Jul 24 '16 at 16:50











  • Why would anyone vote this down? I don't understand how this site works. I am asking a legitimate question looking for a serious answer.

    – DjIns1ght
    Jul 25 '16 at 13:59



















  • Not familiar with AHK, but it sounds like you want an on-the-fly encryption tool like LUKS, eCryptfs, EncFS, etc. Wouldn't leave any un-encrypted files on the HD, etc

    – Xen2050
    Jul 23 '16 at 9:10











  • What's the difference between what you're doing and just compiling it with the source code permanently zipped/locked up somewhere else? Not that you can't decompile an exe but it sounds about the same as what you're doing now without the hassle. After the script is compiled to exe it just goes in your startup folder and runs on boot.

    – JJohnston2
    Jul 24 '16 at 4:24













  • I clarified a part above. "After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. "

    – DjIns1ght
    Jul 24 '16 at 16:42













  • So the issue here is that everytime I reboot the computer the file is zipped in the 7zip. I will have to unzip it and run the file to get it running in the taskbar again and then delete the file and 7zip it all over again. I want the autohotkey to decrypt and encrypt the .ahk file on the fly. It's not an .exe. It's an ahk file that contains text. It can be easily read by notepad.

    – DjIns1ght
    Jul 24 '16 at 16:50











  • Why would anyone vote this down? I don't understand how this site works. I am asking a legitimate question looking for a serious answer.

    – DjIns1ght
    Jul 25 '16 at 13:59

















Not familiar with AHK, but it sounds like you want an on-the-fly encryption tool like LUKS, eCryptfs, EncFS, etc. Wouldn't leave any un-encrypted files on the HD, etc

– Xen2050
Jul 23 '16 at 9:10





Not familiar with AHK, but it sounds like you want an on-the-fly encryption tool like LUKS, eCryptfs, EncFS, etc. Wouldn't leave any un-encrypted files on the HD, etc

– Xen2050
Jul 23 '16 at 9:10













What's the difference between what you're doing and just compiling it with the source code permanently zipped/locked up somewhere else? Not that you can't decompile an exe but it sounds about the same as what you're doing now without the hassle. After the script is compiled to exe it just goes in your startup folder and runs on boot.

– JJohnston2
Jul 24 '16 at 4:24







What's the difference between what you're doing and just compiling it with the source code permanently zipped/locked up somewhere else? Not that you can't decompile an exe but it sounds about the same as what you're doing now without the hassle. After the script is compiled to exe it just goes in your startup folder and runs on boot.

– JJohnston2
Jul 24 '16 at 4:24















I clarified a part above. "After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. "

– DjIns1ght
Jul 24 '16 at 16:42







I clarified a part above. "After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. "

– DjIns1ght
Jul 24 '16 at 16:42















So the issue here is that everytime I reboot the computer the file is zipped in the 7zip. I will have to unzip it and run the file to get it running in the taskbar again and then delete the file and 7zip it all over again. I want the autohotkey to decrypt and encrypt the .ahk file on the fly. It's not an .exe. It's an ahk file that contains text. It can be easily read by notepad.

– DjIns1ght
Jul 24 '16 at 16:50





So the issue here is that everytime I reboot the computer the file is zipped in the 7zip. I will have to unzip it and run the file to get it running in the taskbar again and then delete the file and 7zip it all over again. I want the autohotkey to decrypt and encrypt the .ahk file on the fly. It's not an .exe. It's an ahk file that contains text. It can be easily read by notepad.

– DjIns1ght
Jul 24 '16 at 16:50













Why would anyone vote this down? I don't understand how this site works. I am asking a legitimate question looking for a serious answer.

– DjIns1ght
Jul 25 '16 at 13:59





Why would anyone vote this down? I don't understand how this site works. I am asking a legitimate question looking for a serious answer.

– DjIns1ght
Jul 25 '16 at 13:59










2 Answers
2






active

oldest

votes


















1














Try converting it into an .exe with the compiler. It makes it unreadable but there are also ways to 'decrypt' machine code. I know this is late but I just needed to look this up and came up with this solution.






share|improve this answer
























  • Decrypting machine code is hard.   Finding text strings in executable files is easy.

    – Scott
    Feb 5 at 7:32











  • Hmm. I guess you could try looping through a word with if statements? If a written, write b, if b written - write c, if c written - write d. This also could be recognized with pattern searches or something similar I guess

    – Anonynoose
    Feb 11 at 9:36





















0














zipping and unzipping is complete overkill.



The easiest thing to do is just use Windows Encrypted File System to encrypt the AHK files. To use this feature, right-click a file or folder, select Properties, and click the Advanced button on the General tab. Enable the Encrypt contents to secure data option. Files are essentially encrypted with your Windows user account password, so you’ll lose them if you forget your Windows password.






share|improve this answer
























  • But...I can still read it. I want the file to be unreadable in plain text.

    – DjIns1ght
    Jul 25 '16 at 13:58











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1104153%2fhow-can-i-encrypt-decrypt-an-autohotkey-ahk-file-on-the-fly%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Try converting it into an .exe with the compiler. It makes it unreadable but there are also ways to 'decrypt' machine code. I know this is late but I just needed to look this up and came up with this solution.






share|improve this answer
























  • Decrypting machine code is hard.   Finding text strings in executable files is easy.

    – Scott
    Feb 5 at 7:32











  • Hmm. I guess you could try looping through a word with if statements? If a written, write b, if b written - write c, if c written - write d. This also could be recognized with pattern searches or something similar I guess

    – Anonynoose
    Feb 11 at 9:36


















1














Try converting it into an .exe with the compiler. It makes it unreadable but there are also ways to 'decrypt' machine code. I know this is late but I just needed to look this up and came up with this solution.






share|improve this answer
























  • Decrypting machine code is hard.   Finding text strings in executable files is easy.

    – Scott
    Feb 5 at 7:32











  • Hmm. I guess you could try looping through a word with if statements? If a written, write b, if b written - write c, if c written - write d. This also could be recognized with pattern searches or something similar I guess

    – Anonynoose
    Feb 11 at 9:36
















1












1








1







Try converting it into an .exe with the compiler. It makes it unreadable but there are also ways to 'decrypt' machine code. I know this is late but I just needed to look this up and came up with this solution.






share|improve this answer













Try converting it into an .exe with the compiler. It makes it unreadable but there are also ways to 'decrypt' machine code. I know this is late but I just needed to look this up and came up with this solution.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 5 at 7:03









AnonynooseAnonynoose

111




111













  • Decrypting machine code is hard.   Finding text strings in executable files is easy.

    – Scott
    Feb 5 at 7:32











  • Hmm. I guess you could try looping through a word with if statements? If a written, write b, if b written - write c, if c written - write d. This also could be recognized with pattern searches or something similar I guess

    – Anonynoose
    Feb 11 at 9:36





















  • Decrypting machine code is hard.   Finding text strings in executable files is easy.

    – Scott
    Feb 5 at 7:32











  • Hmm. I guess you could try looping through a word with if statements? If a written, write b, if b written - write c, if c written - write d. This also could be recognized with pattern searches or something similar I guess

    – Anonynoose
    Feb 11 at 9:36



















Decrypting machine code is hard.   Finding text strings in executable files is easy.

– Scott
Feb 5 at 7:32





Decrypting machine code is hard.   Finding text strings in executable files is easy.

– Scott
Feb 5 at 7:32













Hmm. I guess you could try looping through a word with if statements? If a written, write b, if b written - write c, if c written - write d. This also could be recognized with pattern searches or something similar I guess

– Anonynoose
Feb 11 at 9:36







Hmm. I guess you could try looping through a word with if statements? If a written, write b, if b written - write c, if c written - write d. This also could be recognized with pattern searches or something similar I guess

– Anonynoose
Feb 11 at 9:36















0














zipping and unzipping is complete overkill.



The easiest thing to do is just use Windows Encrypted File System to encrypt the AHK files. To use this feature, right-click a file or folder, select Properties, and click the Advanced button on the General tab. Enable the Encrypt contents to secure data option. Files are essentially encrypted with your Windows user account password, so you’ll lose them if you forget your Windows password.






share|improve this answer
























  • But...I can still read it. I want the file to be unreadable in plain text.

    – DjIns1ght
    Jul 25 '16 at 13:58
















0














zipping and unzipping is complete overkill.



The easiest thing to do is just use Windows Encrypted File System to encrypt the AHK files. To use this feature, right-click a file or folder, select Properties, and click the Advanced button on the General tab. Enable the Encrypt contents to secure data option. Files are essentially encrypted with your Windows user account password, so you’ll lose them if you forget your Windows password.






share|improve this answer
























  • But...I can still read it. I want the file to be unreadable in plain text.

    – DjIns1ght
    Jul 25 '16 at 13:58














0












0








0







zipping and unzipping is complete overkill.



The easiest thing to do is just use Windows Encrypted File System to encrypt the AHK files. To use this feature, right-click a file or folder, select Properties, and click the Advanced button on the General tab. Enable the Encrypt contents to secure data option. Files are essentially encrypted with your Windows user account password, so you’ll lose them if you forget your Windows password.






share|improve this answer













zipping and unzipping is complete overkill.



The easiest thing to do is just use Windows Encrypted File System to encrypt the AHK files. To use this feature, right-click a file or folder, select Properties, and click the Advanced button on the General tab. Enable the Encrypt contents to secure data option. Files are essentially encrypted with your Windows user account password, so you’ll lose them if you forget your Windows password.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jul 24 '16 at 17:28









KeltariKeltari

51.6k18119170




51.6k18119170













  • But...I can still read it. I want the file to be unreadable in plain text.

    – DjIns1ght
    Jul 25 '16 at 13:58



















  • But...I can still read it. I want the file to be unreadable in plain text.

    – DjIns1ght
    Jul 25 '16 at 13:58

















But...I can still read it. I want the file to be unreadable in plain text.

– DjIns1ght
Jul 25 '16 at 13:58





But...I can still read it. I want the file to be unreadable in plain text.

– DjIns1ght
Jul 25 '16 at 13:58


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1104153%2fhow-can-i-encrypt-decrypt-an-autohotkey-ahk-file-on-the-fly%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido