marcovich Posted April 26, 2006 Posted April 26, 2006 Is possible to compile a script stored in an array within another compiled autoit script? That means, without writing out to a au3 file first
Paulie Posted April 27, 2006 Posted April 27, 2006 marcovich said: Is possible to compile a script stored in an array within another compiled autoit script?That means, without writing out to a au3 file firstI would assume so, But i think you would have to edit the script with the array to make it's array contain "name of script.exe" as opposed to "name of script.au3"
marcovich Posted April 27, 2006 Author Posted April 27, 2006 Paulie said: I would assume so, But i think you would have to edit the script with the array to make it's array contain "name of script.exe" as opposed to "name of script.au3"Thanks for your answer. May be the next code example clarify what I am trying:$dim $arrlines[5] $arrlines[0]='; this is to be compiled at run time' $arrlines[1]='$a="hello"' $arrlines[2]='$username=InputBox("","type your name")' $arrlines[3]='MsgBox(0,"",$a & " " & $username)' $arrlines[4]='Exit' Run(@ComSpec & " /c " & 'aut2exe.exe /in ' & [color=#FF0000]$arrlines [/color] & ' /out "' & @ProgramFilesDir & '\hello.au3"', "", @SW_HIDE)the problem is that " /in" parameter for aut2exe has to be a file, but for security I would prefer not to write the source code to any file.
marcovich Posted April 27, 2006 Author Posted April 27, 2006 marcovich said: Thanks for your answer. May be the next code example clarify what I am trying:$dim $arrlines[5] $arrlines[0]='; this is to be compiled at run time' $arrlines[1]='$a="hello"' $arrlines[2]='$username=InputBox("","type your name")' $arrlines[3]='MsgBox(0,"",$a & " " & $username)' $arrlines[4]='Exit' Run(@ComSpec & " /c " & 'aut2exe.exe /in ' & [color=#FF0000]$arrlines [/color] & ' /out "' & @ProgramFilesDir & '\hello.au3"', "", @SW_HIDE)the problem is that " /in" parameter for aut2exe has to be a file, but for security I would prefer not to write the source code to any file.Sorry, I didn't know that font color doesn´t show for a code segment. This is the right code:$dim $arrlines[5] $arrlines[0]='; this is to be compiled at run time' $arrlines[1]='$a="hello"' $arrlines[2]='$username=InputBox("","type your name")' $arrlines[3]='MsgBox(0,"",$a & " " & $username)' $arrlines[4]='Exit' Run(@ComSpec & " /c " & 'aut2exe.exe /in ' & $arrlines & ' /out "' & @ProgramFilesDir & '\hello.au3"', "", @SW_HIDE)
evilertoaster Posted April 27, 2006 Posted April 27, 2006 I dont think you can inturprit indivudal lines like that. You might try instead the "Execute" function of the beta...but it is limited in what it can do...
MSLx Fanboy Posted April 27, 2006 Posted April 27, 2006 What about FileInstall, and pass Command Line Arguments? Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Uten Posted April 27, 2006 Posted April 27, 2006 Do you intend to make the content of the array dynamic, or will it be the same always? Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
neogia Posted April 27, 2006 Posted April 27, 2006 I've already looked into this as an alternative for my multithreading UDF, but unfortunately it's not possible. I think the best you can do for protection is to obfuscate your code using SmOke_N's awesome UDF that does exactly that. Quite well, I might add... You can find it here:EnCodeIt by SmOke_NBasically, obfuscation is just a method that makes your code INCREDIBLY hard to understand. It turns all your variable names, function names, etc. into garbledy-gook. You should try it out, and just see how hard it is to read your OWN code. It's nearly impossible. Anywho, until they let us compile/run multiple lines, this might be your only option. Good luck. [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia
marcovich Posted April 27, 2006 Author Posted April 27, 2006 evilertoaster: yes, execute function is limited MSLx: using parameters, break security in a delicate zone Uten: yes, the array content is dynamic. That's why I have to compile it on the fly neogia: I will try EnCodeIt. First I will obfuscate the script, and then will store in the array. Do you know if I could edit some literals in the array-code after obfuscation? Finally I'll save the script in a file, then compile.
Moderators SmOke_N Posted April 27, 2006 Moderators Posted April 27, 2006 marcovich said: neogia:I will try EnCodeIt.First I will obfuscate the script, and then will store in the array.Do you know if I could edit some literals in the array-code after obfuscation?Finally I'll save the script in a file, then compile.Good luck with editing after obfuscation.If it something you want dynamic, I put those types of info at the very top, so I know where they are and can edit accordingly (just hope it's not text in those arrays for your sake). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
zeroZshadow Posted April 27, 2006 Posted April 27, 2006 why don't u just WRITE the script into the file and then compile it -.- *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
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