autocompiler Posted July 30, 2016 Share Posted July 30, 2016 Hello Guys here is the code,i am a newbie in autoit still learning so be patient whit me XD!!! i wanted to crypt the files inside user profile directory folders, in my case the music folder but even the picture or videos or documents,but it keeps giving me error also i wanted to do same thing for the decryption of the files please let me know what i am doing wrong!! #include <File.au3> #include <Crypt.au3> $a_files = _FileListToArray(@UserProfileDir & "Music") For $i = 1 To $a_files[0] $rc = _Crypt_EncryptFile(@UserProfileDir & "Music" & $a_files[$i],@UserProfileDir & "Music" & $a_files[$i] & ".crypt", "APASSWORD", $CALG_AES_256) FileDelete ( "@UserProfileDir & "Music" & $a_files[$i]" ) Next I still dont know if this script will encrypt only files or even the folders ? i wanted to encrypt everything including the folders inside the folder music!! but also i want to be able to decrypt everything in it!!!And yes Music folder macro is not available if not the problem was solved i think!!!! Thanks in Advance you guys for the help!!!! Link to comment Share on other sites More sharing options...
JohnOne Posted July 30, 2016 Share Posted July 30, 2016 Not sure I understand the question. Kind of like what ransomware does? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
autocompiler Posted July 30, 2016 Author Share Posted July 30, 2016 I simply want to be able to encrypt the music , pictures and videos folder of the windows 7 and be able to decrypt them when i want..what exctly you need to understand?and what is a ransomware? anyway the code is simple and would be really handy for me to protect files and folders whit one exe!! Link to comment Share on other sites More sharing options...
spudw2k Posted August 1, 2016 Share Posted August 1, 2016 (edited) You'd be better off using folder permissions and native NTFS encryption in my opinion. Folders dont get encrypted really, just their contents. The folder is just a container. At best you could rename/obfuscate it or "package" the folder into an encrypted archive, but then you won't have the flexibility to access to the individual files as easily. Your FileDelete statement is malformed (syntax) by the way. Take due care correcting it though if you're going to keep playing with the _Crypt_EncryptFile function. Edited August 1, 2016 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted August 2, 2016 Share Posted August 2, 2016 Whole disk encryption like bitlocker is probably the best bet to protect a lot of files and still be able to use them regularly without a lot of time/trouble. If you just want to block out a lot of files from access but then enable access to them later you can try NTFS but other administrators can change it, or if the disk is taken into a different OS or state that does not respect NTFS permissions it wont be protected. Something like WinZip/WinRar/7Zip can add passwords to archives. So you can automate packaging up the files into an archive with a password on it. Pretty much would do exactly what you want to do, its just a lot of overhead depending on how much data your constantly packaging and then unpackaging. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now