trancexx Posted September 9, 2014 Author Share Posted September 9, 2014 That seems to do the trick too. Yes, but that means something is wrong. I'm using semaphore object to synchronize different actions, and in your case that doesn't work as I would expect. So, regardless of the issues you have with this script, can you check that it does the job all the same? Could you change compiled executable (just one byte is enough) with some hex editor and see if error verification message is displayed. You can also append some random data to the exe. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted September 10, 2014 Share Posted September 10, 2014 I wouldn't even know where to start changing a byte to be honest But I'll definitely give it a go if you can point me to a decent hex editor. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Gianni Posted September 10, 2014 Share Posted September 10, 2014 (edited) Dear trancexx, Please clone yourself ; the world needs more people like you. A fan. agree <snip> Please clone yourself <snip> .... here it is trancexx cloner (just for fun) expandcollapse popup#include <GDIPlus.au3> #include <WindowsConstants.au3> HotKeySet('{ESC}', '_Quit') ;Mouse GUIRegisterMsg(0x0202, "_Quit") GUIRegisterMsg(0x0205, "_Quit") Global $FileimgClone[2] = [@TempDir & "\clone.gif",@TempDir & "\Flower.gif"] If Not FileExists($FileimgClone[0]) Then InetGet("http://static1.autoit-cdn.com/forum/uploads/profile/photo-thumb-33569.jpg", $FileimgClone[0]) If Not FileExists($FileimgClone[1]) Then InetGet("http://oi59.tinypic.com/2a986dt.jpg", $FileimgClone[1]) ; credit: http://www.webweaver.nu For $i = 1 To 100 $Width = Random(0, @DesktopWidth - 100, 1) $Height = Random(0, @DesktopHeight - 100, 1) image($Width, $Height, $FileimgClone[Random(0,1,1)]) Next Sleep(3000) FileDelete($FileimgClone[0]) FileDelete($FileimgClone[1]) Func image($Left, $Top, $Picture) $yGUI = GUICreate("", 100, 100, $Left, $Top, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) _GDIPlus_Startup() $yImage = _GDIPlus_ImageLoadFromFile($Picture) GUISetState(@SW_SHOW, $yGUI) $iOpacity = 255 For $i = 0 To $iOpacity Step 10 SetBitmap($yGUI, $yImage, $i) ; 255) Sleep(10) Next EndFunc ;==>image Func SetBitmap($hGUI, $hImage, $iOpacity) Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage)) DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage)) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", 1) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC(0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC($hMemDC) EndFunc ;==>SetBitmap Func _Quit() Exit EndFunc ;==>_Quit p.s. drawing function taken from AZJIO's ">A gift of flowers" Edited September 10, 2014 by Chimp Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
trancexx Posted September 10, 2014 Author Share Posted September 10, 2014 I wouldn't even know where to start changing a byte to be honest But I'll definitely give it a go if you can point me to a decent hex editor. WinHex is super nice. It's not free tool, but you can do this with evaluation version too. If you are on win8 or above, just search the store for hex editor, there are few free ones available. @Chimp guy, that's nice, flowers and shit, how lovely. But really, I'm not that good. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
jchd Posted September 10, 2014 Share Posted September 10, 2014 PsPad works and is a decent editor as well. trancexx 1 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) Link to comment Share on other sites More sharing options...
UEZ Posted September 10, 2014 Share Posted September 10, 2014 @Chimp: marriage proposal to trancexx? Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
JohnOne Posted September 10, 2014 Share Posted September 10, 2014 I tried to alter 1 byte with HxD, but when I try to run it, just get a win error saying the file is not valid win32 file. Guess I have no idea which byte to change. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
UEZ Posted September 10, 2014 Share Posted September 10, 2014 Probably you changed something in the PE header which was broken afterwards.Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
JohnOne Posted September 10, 2014 Share Posted September 10, 2014 (edited) Yeah, I just added a bunch of bytes at the end, and I got the message box that the file has been changed, so it appears to work with line 30 commented out. EDIT: "Binary integrity can't be verified" Edited September 10, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trancexx Posted September 10, 2014 Author Share Posted September 10, 2014 It's safe to change something from the top. PE files start with legacy header in which you can find message "This program cannot be run in DOS mode". Change it to "This program is mine, mine, bwahaha!" ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted September 10, 2014 Share Posted September 10, 2014 It's safe to change something from the top. PE files start with legacy header in which you can find message "This program cannot be run in DOS mode". Change it to "This program is mine, mine, bwahaha!" I actually tried editing that string first, it ran but a command prompt flashed up quick and it just exited AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trancexx Posted September 10, 2014 Author Share Posted September 10, 2014 Wait a second there mister. Are you compiling CUI all this time? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted September 10, 2014 Share Posted September 10, 2014 No ma'am. Don't know if you missed my earlier post, but it does work with the line commented. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trancexx Posted September 10, 2014 Author Share Posted September 10, 2014 (edited) That's great. I just have to figure out what's the problem with semaphore. Btw, when you edit bytes inside the exes, don't delete them or add new, just change them. By removing or adding new bytes all the addresses or whatnot are made invalid, and exe gets corrupted. Edited September 10, 2014 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
joakim Posted September 10, 2014 Share Posted September 10, 2014 Great idea and code! Very nice. But there's still a way to fool the compiled binary. Remove the CHKS resource, modify the binary to fit your needs, and then re-run the program. In the end it will compare itself against the checksum generated on the hacked executable. Link to comment Share on other sites More sharing options...
trancexx Posted September 14, 2014 Author Share Posted September 14, 2014 JohnOne, is your system 64bit? If yes then where did you ran your exe from, program files or some subdir of it? If yes, I'll kill you because that's just lame. File system redirection can explain the problems you had with the script. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted September 14, 2014 Share Posted September 14, 2014 I run script from subdir of documents folder, and have 32 bit OS running on 64 bit cpu. There is none of the wow64 nonsense in my folders or registry. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Virgus Posted September 16, 2014 Share Posted September 16, 2014 (edited) Hello trancexx, I'm trying your script but I'm having an error saying: "Unable to add resources" I checked ...Local SettingsApplication DataAutoIt v3Aut2Exe files and I can see clearly that the temp.exe file is correctly generated with all the others, but then the compile process halts. I'm using XP SP3 and Aut2Exe with /nopack option and Autoit Version 3.3.12 I tried commenting line 30 and/or line 48 but nothing changes. JohnOne, could you get back that line and comment-out line 30. This line reruns the exe after the modifications are being done on first run. When commented out, first run doesn't actually start your script. On next runs only the check is done and original script is executed. What might the problem be? Thanks and have a nice day, V. Edited September 16, 2014 by Virgus Link to comment Share on other sites More sharing options...
trancexx Posted September 16, 2014 Author Share Posted September 16, 2014 This script is unrelated to errors you get. The code from here is executed on the first run after you compile your script. If you have problems compiling AutoIt scripts then report that to Jon, he's the only left active developer. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Virgus Posted September 17, 2014 Share Posted September 17, 2014 Hello trancexx, I have had no problems compiling scripts so far. For testing purposes I'm using your sample script. I just installed the newest "clean" Autoit beta and tried again to compile with the #include "CheckSumVerify.au3" and it gives me always the same error. If I comment the include then I get the script compiled. I'll try to install and compile on a clean XP OS and let you know. Ciao, V. 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