xXUlTiMaTeSiNXx Posted March 31, 2009 Posted March 31, 2009 Hey, im writing a script that requires two files to be bound together into a single executable, so just wondering, dose anyone have a AutoIT based binder? I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
Authenticity Posted March 31, 2009 Posted March 31, 2009 $sFile1 = @ScriptDir & '\123.exe' $sFile2 = @ScriptDir & '\456.exe' $sFile3 = @ScriptDir & '\789.exe' FileWrite($sFile1, Binary('LaLaLa')) FileWrite($sFile2, Binary('NaNaNa')) Run(@ComSpec & ' /c copy /b "' & $sFile1 & '"+"' & $sFile2 & '" "' & $sFile3 & '"', '', @SW_HIDE)
xXUlTiMaTeSiNXx Posted March 31, 2009 Author Posted March 31, 2009 (edited) $sFile1 = @ScriptDir & '\123.exe' $sFile2 = @ScriptDir & '\456.exe' $sFile3 = @ScriptDir & '\789.exe' FileWrite($sFile1, Binary('LaLaLa')) FileWrite($sFile2, Binary('NaNaNa')) Run(@ComSpec & ' /c copy /b "' & $sFile1 & '"+"' & $sFile2 & '" "' & $sFile3 & '"', '', @SW_HIDE)ƒoÝŠ÷ Ûú®¢×…©ä³*.ŠËaŠÌ!jجv‹jëhŠ×6$sFile1 = @ScriptDir & '\123.exe' ;Sets $sFile1 to @ScriptDir & '\123.exe (and as per the other two files) $sFile2 = @ScriptDir & '\456.exe' $sFile3 = @ScriptDir & '\789.exe' FileWrite($sFile1, Binary('LaLaLa')) ; Writes in binary "LaLaLa" (and so on with the next line) FileWrite($sFile2, Binary('NaNaNa')) Run(@ComSpec & ' /c copy /b "' & $sFile1 & '"+"' & $sFile2 & '" "' & $sFile3 & '"', '', @SW_HIDE); what dose this do? where dosethe actuly binding happen? (sorry im a n00b) Edited March 31, 2009 by xXUlTiMaTeSiNXx I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
Authenticity Posted March 31, 2009 Posted March 31, 2009 It's just a fast way using the dos command "copy" copy /b source1+source2+source3 destination /b switch is for binary mode copy and the files between the plus sign are the source for the resulting destination file If you want, you can replicate it: FileWrite(@ScriptDir & '\Result.exe', Binary(FileRead($sFile1) & FileRead($sFile2)))
xXUlTiMaTeSiNXx Posted March 31, 2009 Author Posted March 31, 2009 If you want, you can replicate it: FileWrite(@ScriptDir & '\Result.exe', Binary(FileRead($sFile1) & FileRead($sFile2))) so this will make $sFILE1 and $sFILE2 into a single .exe called Result.exe? I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
Authenticity Posted March 31, 2009 Posted March 31, 2009 Yes, you can check it: $sFile1 = @ScriptDir & '\111.exe' $sFile2 = @ScriptDir & '\222.exe' $sFile3 = @ScriptDir & '\333.exe' FileWrite($sFile1, Binary('1111111111111111111111111111111111111111111')) FileWrite($sFile2, Binary('2222222222222222222222222222222222222222222')) Sleep(200) FileWrite($sFile3, Binary(FileRead($sFile1) & FileRead($sFile2)))
xXUlTiMaTeSiNXx Posted March 31, 2009 Author Posted March 31, 2009 (edited) Yes, you can check it: $sFile1 = @ScriptDir & '\111.exe' $sFile2 = @ScriptDir & '\222.exe' $sFile3 = @ScriptDir & '\333.exe' FileWrite($sFile1, Binary('1111111111111111111111111111111111111111111')) ; <--Here FileWrite($sFile2, Binary('2222222222222222222222222222222222222222222')) ; <--and here Sleep(200) FileWrite($sFile3, Binary(FileRead($sFile1) & FileRead($sFile2))) ok, thanks, but whats with it writing 1111111111111 and 222222222222 into it? **EDIT i think i get it, its makeing it so file 1 and file 2 have something in them as opposed to being 0 bytes? Edited March 31, 2009 by xXUlTiMaTeSiNXx I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
Authenticity Posted March 31, 2009 Posted March 31, 2009 I could use your Calc.exe and double it into CalcCalc.exe if you want, lol. ;]
3xM3NT4Lx4 Posted March 31, 2009 Posted March 31, 2009 Authenticity is awesome.. always helping people.
xXUlTiMaTeSiNXx Posted March 31, 2009 Author Posted March 31, 2009 (edited) Ok, so heres what happens runing this code;Bind.exe contains the below code.$sFile1 = @ScriptDir & '\111.exe' $sFile2 = @ScriptDir & '\222.exe' $sFile3 = @ScriptDir & '\333.exe' FileWrite($sFile1, Binary('1111111111111111111111111111111111111111111')) FileWrite($sFile2, Binary('2222222222222222222222222222222222222222222')) Sleep(200) FileWrite($sFile3, Binary(FileRead($sFile1) & FileRead($sFile2)))Output of "333.exe" after "Binder.exe";A message box titled "Test" with the text "This is file 333.exe"the flie size of 333.exe has gone from 283kb to 851kb.How to make all the files run? Edited March 31, 2009 by xXUlTiMaTeSiNXx I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
Authenticity Posted March 31, 2009 Posted March 31, 2009 It doesn't work this way. Concatenating two files doesn't mean that it's now a valid executable that is somewhat mix of the two source executable files. Now the picture gets clear. ;[
xXUlTiMaTeSiNXx Posted March 31, 2009 Author Posted March 31, 2009 It doesn't work this way. Concatenating two files doesn't mean that it's now a valid executable that is somewhat mix of the two source executable files. Now the picture gets clear. ;[Well this sure sucks, any way around this? to make it a valid .exe? I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
xXUlTiMaTeSiNXx Posted April 1, 2009 Author Posted April 1, 2009 BUMP. [still unresolved] I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
SpookMeister Posted April 1, 2009 Posted April 1, 2009 Two questions... What are you smoking? and Where can I get some? [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
xXUlTiMaTeSiNXx Posted April 1, 2009 Author Posted April 1, 2009 Two questions...What are you smoking? and Where can I get some?weedfind a man with long hair and give him $25 I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
ResNullius Posted April 1, 2009 Posted April 1, 2009 Hey, im writing a script that requires two files to be bound together into a single executable, so just wondering, dose anyone have a AutoIT based binder?Why do you need two files bound together into one exe?Can't you just FileInstall() your exes to the @TempDir and then run them as required?
xXUlTiMaTeSiNXx Posted April 2, 2009 Author Posted April 2, 2009 Why do you need two files bound together into one exe?Can't you just FileInstall() your exes to the @TempDir and then run them as required?no, i need the files physicaly as one. I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
MrMitchell Posted April 2, 2009 Posted April 2, 2009 And the question STILL remains... Why do you need two files bound together into one exe? It can be done, but will not work the way you think and want it to.
xXUlTiMaTeSiNXx Posted April 2, 2009 Author Posted April 2, 2009 And the question STILL remains... Why do you need two files bound together into one exe?It can be done, but will not work the way you think and want it to.i am trying to build a binder / byte adder. and this still remains unresolved!!! I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]
trancexx Posted April 2, 2009 Posted April 2, 2009 I'm a bit slow... so, hope you wouldn't mind repeating what exactly you are trying to do. Please use more than one sentence. ♡♡♡ . eMyvnE
Recommended Posts