ChrisL Posted May 29, 2006 Share Posted May 29, 2006 (edited) I know that you can use the decompiler but if you wanted to include the script file as a safe guard then put this at the top of your script.Replace "Put the name of the au3 file here.au3" with your file name and add a password in to the password variable.To recover the script, launch your exe with the command line "recover", so either create a shortcut with the recover parameter or from the command prompt "Myfile.exe recover" you will then be prompted for the password, if they match then the au3 file will be written to your current script directory.For ease of use you could add it to your template.au3 file in your "C:\Documents and Settings\UserName\Templates" directoryUpdate: based on dabus' version which is less work, well done!$password = "MyPassword" If $CMDLINE [0] > 0 and $CMDLINE [1] = "recover" Then $check = InputBox ("Recover", "Password?","", "*") If $Check = $password then FileInstall ("Put the name of the au3 file here.au3", StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ) MsgBox (0,"Output File",StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ,5) Else MsgBox (0,"Error","Incorrect password" ,5) EndIf Exit EndIf ; Script Start - Add your code below here Edited June 9, 2008 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
dabus Posted May 29, 2006 Share Posted May 29, 2006 Why don't you do $password = "MyPassword" If $CMDLINE [1] = "recover" Then $check = InputBox ("Recover", "Password?","", "*") If $Check = $password then FileInstall ("Put the name of the au3 file here.au3", StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ) Exit EndIf ? First steps seem to be quit useless to me. Link to comment Share on other sites More sharing options...
ChrisL Posted May 29, 2006 Author Share Posted May 29, 2006 First steps seem to be quit useless to me.No, the first part includes the file in the compiled exe at compile time.The second part allows you to recover the script from compile time with a password from the exe. [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
RazerM Posted May 29, 2006 Share Posted May 29, 2006 Why don't you do ?First steps seem to be quit useless to me.Yes i have tried yours and it works. The compiler adds all files ignoring conditions. But it only extracts them if the condition surrounding them is true My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
ChrisL Posted May 29, 2006 Author Share Posted May 29, 2006 (edited) Yes appologies dabus you are correct. $password = "MyPassword" If $CMDLINE [0] > 0 and $CMDLINE [1] = "recover" Then $check = InputBox ("Recover", "Password?","", "*") If $Check = $password then FileInstall ("Put the name of the au3 file here.au3", StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ) MsgBox (0,"Output File",StringtrimRight (@ScriptFullPath, 4) & "_rec.au3" ,5) Else MsgBox (0,"Error","Incorrect password" ,5) EndIf Exit EndIf ; Script Start - Add your code below here Edited May 29, 2006 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
bluebearr Posted September 2, 2006 Share Posted September 2, 2006 I usually just do this: If StringInStr($cmdlineRaw, "/MySecretRecoverSwitch") Then ; Recover the source FileInstall("Source.au3", @TempDir & "\Source.au3", 1) EndIf BlueBearrOddly enough, this is what I do for fun. Link to comment Share on other sites More sharing options...
dandymcgee Posted September 10, 2006 Share Posted September 10, 2006 for even more enhanced security you could always change $CMDLINE [1] = "recover" . Just change "recover" to something harder to guess, and then it'll be kind of double passworded. Just an idea - Dan [Website] Link to comment Share on other sites More sharing options...
DirtDBaK Posted November 27, 2007 Share Posted November 27, 2007 Great Idea I really like this! [center][/center] 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