ct253704 Posted February 21, 2014 Share Posted February 21, 2014 Hello, I am trying to find a way to restrict the editing of a specific script without restricting the ability for anyone to run it. I have looked into LoginWrapper and did some forum searching, but can't seem to find anything that does this, or at least not that I was able to figure out. There was a simple password script in the forums that didn't work either. I have even considered writing a script that runs another script in a more discreet location, but that's not secure to anyone who knows anything. Any help would be appreciated. I am to believe AutoIT doesn't have native password protection. I would prefer not to use third party programs, but if you know something subtle and small that would do the trick I wouldn't be opposed. The script will contain a password that I would not like to be accessed if possible. If this isn't feasible, I will just trash the project. Thanks for your help! Link to comment Share on other sites More sharing options...
water Posted February 21, 2014 Share Posted February 21, 2014 If you want to restrict editing (of the source code), compile the script and let the users only access the exe to run it. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
abberration Posted February 21, 2014 Share Posted February 21, 2014 You could go to Comple With Options and compile as CUI and then go to Obfuscator tab and check Run Obfuscaor before compilation. It will give you two files and both are needed to run. Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
Developers Jos Posted February 21, 2014 Developers Share Posted February 21, 2014 .... then go to Obfuscator tab and check Run Obfuscaor before compilation. It will give you two files and both are needed to run. Which 2 files are needed to run? scriptname.exe should do it. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
abberration Posted February 21, 2014 Share Posted February 21, 2014 Which 2 files are needed to run? scriptname.exe should do it. Jos I compiled a script called junk.au3 this way and received junk_Obfuscated.au3 and junk.au3.tbl. Did I do something wrong? Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
water Posted February 21, 2014 Share Posted February 21, 2014 To run a compiled script you only need one file: The exe. The other files are created by other AutoIt tools. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Developers Jos Posted February 21, 2014 Developers Share Posted February 21, 2014 (edited) I compiled a script called junk.au3 this way and received junk_Obfuscated.au3 and junk.au3.tbl. Did I do something wrong? Not done wrong. Obfuscator creates the new Obfuscated junk_obfuscated.au3 source and the TBL file, which are both used by aut2exe to build the compiled junk.exe script. Jos Edited February 21, 2014 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ct253704 Posted March 7, 2014 Author Share Posted March 7, 2014 thanks for the help. I was able to compile and set security on the .exe file using domain security to only allow users to run. One more thing, if I wanted to allow users to edit the script to modify for their personal use, but only allow that person access to editing, could i set it to prompt for a password on edit, but not on run? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 7, 2014 Moderators Share Posted March 7, 2014 Is the person you want to delegate access to going to have AutoIt installed? If so, just include the source with the executable, and they can extract it and make changes from the command line: If StringInStr($cmdlineRaw, "/Extract") Then FileInstall(<path to script>, @TempDir & "\ScriptName.au3", 1) Exit EndIf Running <path to Script> /Extract would copy the original script to the Temp folder, where the person could update and then recompile. "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! Link to comment Share on other sites More sharing options...
ct253704 Posted March 28, 2014 Author Share Posted March 28, 2014 Ha, that is pretty clever! I tested it and that will serve useful for many things. Thank you for that! However, it doesn't quite solve the problem. If somebody besides the client understands the extract ability they could have access to the source with the personal information. I'm looking for a way to only allow the source to be viewed by the person it was designed for. For instance, I give the compiled script to client A and B with personal information of Client A. Client B uses the extract command and pulls Client A's personal information which is bad. I need both to be able to run it, but only one person to be able to edit it. I am not sure if that is possible. Also, the people I am dealing with aren't all that tech savvy, so asking them to do something like extracting and recompiling a script would most likely get me laughed at . Also, is there a way to prevent the script from running when I use the /extract command? It extract the source to the tempdir but it also runs the script. Link to comment Share on other sites More sharing options...
Moderators Solution JLogan3o13 Posted March 28, 2014 Moderators Solution Share Posted March 28, 2014 (edited) First off, if you would like only certain people to extract the project you will have to decide on criteria for this (password, etc.). Something along this line: If StringInStr($cmdlineRaw, "/Extract") Then $pw = InputBox("Extract Access", "Please enter your PIN", "", "*") If $pw = "3.14159265" Then FileInstall("C:\Users\JLogan3o13\Desktop\Test.au3", @TempDir & "\Test.au3", 1) Exit EndIf EndIf MsgBox(0, "", "Test") As to your second point, if they are not tech savvy, why would you let them alter your code in the first place? Edited March 28, 2014 by JLogan3o13 "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! Link to comment Share on other sites More sharing options...
ct253704 Posted March 28, 2014 Author Share Posted March 28, 2014 Perfect, Thank you! Exactly what I needed. And you even gave me some pi. As to your second question, that's a fair point, but certain information they are entering is information I do not know. I quite literally will put in all capital letters exactly what they are to change, tell them only replace words in all caps with the information it is asking without removing any quotation marks or parenthesis. They are intelligent enough to pull that off, I hope.. Thanks for your help with this, I know it seems a bit picky, but this whole project was by request. I am not fond of exposing personal information in this capacity and automating it, but it will make their lives more efficient. Cheers! Link to comment Share on other sites More sharing options...
GrinReaper Posted March 28, 2014 Share Posted March 28, 2014 Couldn't you set up a form for them to fill out that would be used to "complete" the script? That way they don't touch the code. [u]Forum Rules[/u] Follow the rules or be b*t**slapped into next week. 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