Belini Posted September 12, 2017 Posted September 12, 2017 Is there any way to prohibit any kind of file copying while my program is open? I have encrypted files that are released by my program at certain times and I need to prevent them from being copied when they are being used by my program without encryption! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
FrancescoDiMuro Posted September 12, 2017 Posted September 12, 2017 45 minutes ago, Belini said: Is there any way to prohibit any kind of file copying while my program is open? I have encrypted files that are released by my program at certain times and I need to prevent them from being copied when they are being used by my program without encryption! Hi @Belini I was looking at this, but I didn't manage to lock some files I was working on... I think that, to lock a file from copying, you should work on Files/Folders permissions... Something like: - While your script is running, so set 0 the permission to copy, delete, move... a file; - As your script is not running anymore, set 1 the permission to copy, delete, move... a file. Hope that helps Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Moderators JLogan3o13 Posted September 12, 2017 Moderators Posted September 12, 2017 What about setting their attribute to hidden, or dumping them into a buried directory where the end user wouldn't think to look? You know that with AutoIt you are not going to get 100% security. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Belini Posted September 12, 2017 Author Posted September 12, 2017 Quote Something like: - While your script is running, so set 0 the permission to copy, delete, move... a file; - As your script is not running anymore, set 1 the permission to copy, delete, move... a file @FrancescoDiMuro this solution would be perfect, how can I change the file permissions using Autoit? Quote What about setting their attribute to hidden, or dumping them into a buried directory where the end user wouldn't think to look? @JLogan3o13 this I already did and other people could find where the file was decrypted, I need to prevent copying and delete the file when my program is no longer using it! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Moderators JLogan3o13 Posted September 12, 2017 Moderators Posted September 12, 2017 The problem with setting the permissions is that (presumably) you're running the script under the end user's credentials - which means if they are as tenacious as you say they are they will have rights to change the ACLs back. You can do a google search on setting ACLs on files - there is even a set ACL UDF on this forum if you search - but you would have to do it under credentials the end user does not have access to. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Belini Posted September 12, 2017 Author Posted September 12, 2017 (edited) @JLogan3o13 I found the ACL UDF and I used the _DenyAllAccess() function to restrict all object access and this worked but I need it to be released just for reading and using _GrantReadAccess() released for reading and for copying as well, how to release only for reading? Edited September 12, 2017 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Luigi Posted September 12, 2017 Posted September 12, 2017 My sugestion: https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_LockResource.htm Visit my repository
spudw2k Posted September 13, 2017 Posted September 13, 2017 10 hours ago, Luigi said: My sugestion: https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_LockResource.htm How is that going to help? 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 Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Belini Posted September 13, 2017 Author Posted September 13, 2017 6 hours ago, spudw2k said: How is that going to help? I also could not understand how this can help My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Luigi Posted September 13, 2017 Posted September 13, 2017 My mystake, I want say: https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_LockFile.htm Belini 1 Visit my repository
Belini Posted September 15, 2017 Author Posted September 15, 2017 How can I tell when a file is being copied? If I can tell when a copy was started I can shut down the computer and this would solve my problem! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
czardas Posted September 15, 2017 Posted September 15, 2017 (edited) Can't you just access the decrypted data in RAM without writing to disk? Is it such a lot of data to hold in memory? Edited September 15, 2017 by czardas operator64 ArrayWorkshop
Belini Posted September 16, 2017 Author Posted September 16, 2017 I think it might work but I do not know how to decrypted in RAM without writing to disk, they are video files that I need to protect and release to play without letting them be copied! My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
czardas Posted September 17, 2017 Posted September 17, 2017 (edited) I would have thought _Crypt_DecryptData() would suffice (I haven't used it, so I'm not sure). Unfortunately videos are likely to require too much RAM. I'm also not sure how you would then play the video(s) after that. I'm sure it's doable though. If it were just plain text, it would be easy. Edited September 17, 2017 by czardas operator64 ArrayWorkshop
jchd Posted September 17, 2017 Posted September 17, 2017 Perhaps the answer is to decrypt in RAM enough blocks ahead to cope with potential system lag but not the whole beast. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
czardas Posted September 17, 2017 Posted September 17, 2017 (edited) I think you just invented streaming video. This is a bit over my head. The earlier suggestion (using permissions) sounds a lot simpler. I would still love to see an example of streaming video implemented in AutoIt. Maybe one already exists - I haven't looked. Edited September 17, 2017 by czardas operator64 ArrayWorkshop
jchd Posted September 17, 2017 Posted September 17, 2017 In fact the final answer has been posted to the French forum, where the OP is duplicating his request. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
czardas Posted September 17, 2017 Posted September 17, 2017 (edited) Perhaps you could share the link. I think I got it: https://www.autoitscript.fr/forum/viewtopic.php?f=3&t=14688 Edited September 17, 2017 by czardas operator64 ArrayWorkshop
jchd Posted September 17, 2017 Posted September 17, 2017 That ? BTW posting the same request on two fora means twice the job for readers/helpers. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
czardas Posted September 17, 2017 Posted September 17, 2017 I get your point. operator64 ArrayWorkshop
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