
Originally Posted by
spare2
I am no AutoIt expert, but in .Net, I would attempt to Process.Kill(); Engine.exe before it exits. That would instantly close the process without it saving any data. This is one reason why autoIt is not a good language to be dealing with window APIs and calling DLL functions.
P.S. You realize it only returns 1 if the process no longer EXISTS.
Code:
ProcessWait Close
Pauses script execution until a given process does not exist.
ProcessWait Close ( "process" [, timeout] )
Smart comeback but you realize you didn't do what you mentioned above?
Code:
Func _FREEREMOTEDLL($HMODULE, $PROCESS)
Local $RET, $ERR = 0
Local $HPROCESS = _GETPROCHANDLE($PROCESS)
If Not $HPROCESS Then
$ERR = 7
Else
Local $FREELIBRARY = _GETPROCADDRESS(_WinAPI_GetModuleHandle("kernel32.dll"), "FreeLibrary")
$RET = _CREATEREMOTETHREAD($HPROCESS, $FREELIBRARY, $HMODULE)
If Not $RET Then
$ERR = 12
Else
_WinAPI_WaitForSingleObject($RET)
_WinAPI_CloseHandle($RET)
EndIf
_WinAPI_CloseHandle($HPROCESS)
EndIf
Return SetError($ERR, 0, Number(($ERR = 0)))
EndFunc
Func _GETPROCHANDLE($PROCESS)
Local $HPROCESS = 0
Local $PERMISSION = BitOR(2, 8, 32)
If IsInt($PROCESS) Then
If $PROCESS > 0 Then
Local $RET = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", $PERMISSION, "int", 0, "dword", $PROCESS)
If ((Not @error) And $RET[0]) Then
$HPROCESS = $RET[0]
EndIf
EndIf
EndIf
Return SetError(Number(($HPROCESS = 0)), 0, $HPROCESS)
You can never know if "_GETPROCHANDLE" fails, because it even if $PROCESS isn't an int, it still returns 0.
And BTW, the coding scipt for autoIT .dll injection can be found with a click of a button on google, so I don't know if you really did that yourself or not. And considering your style of recording things down and coding, it's very doubtful you did it from scratch. If you had to look at a reference while you coded that thing. That shows you don't know much either.
you should really KNOW the language before judging on it..
And if you think for one second that the Include file you found is the SAME Include file im using for my program. then use my script with that include file to create your own injector.
I've got 100 bucks says that you fail so hard you'll never figure out how to do it properly.. And yea i do know that the Include file for injection is available at the click of a mouse on google.. But the point of it is that you need to know how to fix the include itself to make it work properly.
Also if i'm not mistaken.. that Func you put in that post says and i quote
Local $HPROCESS = _GETPROCHANDLE($PROCESS)
If Not $HPROCESS Then
$ERR = 7
Else
which means that the @error will be set to 7 if _GETPROCHANDLE function fails.. and the part u forgot about _GETPROCHANDLE was the details of it.
Code:
; Name...........: _GetProcHandle
; Description ...: Opens a process with specific rights
; Syntax.........: _GetProcHandle($process)
; Parameters ....: $process - PID of the remote process
; Return values .: Success - Returns a handle to the remote process
; Failure - Returns 0 and Sets @Error to 1
; Author ........: Erik Pilsits
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........;
; Example .......;
;
and i'm pretty sure that success returns the handle whether its an int or not but mostly NOT because the handle its trying to retrieve from Engine.exe is "Combat_Arms" and not a number / integer. and failure does return 0, but it sets the @error to 1.. why would it return an Integer when the data its given to retrieve information from is an integer itself..
Here's what i mean.
$PID = ProcessExists("Engine.exe") < Returns an Int like "198567"
$hWnd = _GETPROCHANDLE($PID) < Returns "Combat_Arms" / whatever the current window handle of the process is.
so i don't really understand why you are asking me shit about stuff you don't even want to know about since you obviously have the files available for reading you just want me to explain it to you so you can understand it? or is it that you are too lazy to actually read and simply want me to tell you?
thats about all i understood from what you're getting at, but here's my next statement to you. If you feel that i have not explained myself properly or my script properly or if you feel that there is some understanding that you are not getting completely, please go somewhere else with it, because i am at my full capacity for annoyances with you. explain it to you and you ask again, explain it better and you ask again, explain the better explanation and yet you ask again.. i'm not replying to any more of your posts, questions, or calls of insecurity, or whatever your goal is by decompiling my programs and asking me about every little detail in the script itself..
READ THE SCRIPTS, LEARN FROM THE SCRIPTS, AND IF YOU HAVE PROBLEMS UNDERSTANDING SOMETHING ASK NICELY!!
seriously how hard is it to ask nicely about something you don't understand? is it really necessary to act so rude because you can't wrap your head around a simple concept?
OH AND ONE MORE THING.. i completely forgot the top of your post.. the part about using processkill to instantly close the game without it saving said data.. you're wrong.. if the injected .dll is never freed from injection then the data left behind by it will still be left behind, no matter how you close the game. End Task, ALT+F4, normal closing or anything. you have to free the .dll in order to completely remove its data and signatures from the game..
of course .NET injectors work to the point of getting the files injected to do what they do.. but they fail because they leave so many signatures behind for Nexon or whoever to find and not only patch the .dll hack itself, but the injector.
here's an example of that.. That0n3guy, aka eddie, made 3 injectors within a month because Nexon detected and patched them.. xFaith had to remake his v2.0 injector because Nexon detected one single line of code from it and patched it.. Mine however will take a lot longer to detect or patch because it removes the data and signatures before closing.

Originally Posted by
SethSkyler Backup
I know your sticking up for WPS cause he is awesome, but I doubt he does the whole code by himself.
Every good coder or programmer takes some source code.
you're correct.. i didn't do the full code myself.. i do have people who help me understand what i dont grasp.. and as you can see from that guys post, he got the same include file i got for injection, but the actual injection code doesn't work for games, it had to be modified in order for it to work, which no i didn't do that entirely alone
@spare2
you see my script since you decompiled it, then you can see the list of include files i have.. find the one that says
#include <_1.au3>
thats the modified injection source i made.. you'll notice that the other include files have multiple recalls of the .au3 files.. no reason at all really.. i just made sure that i had all the include files from my test scripts by copying and pasting them into that script, so a bunch of them were doubled since i didnt feel like removing the duplicates.. Do you see any other include file for injecting? for example the files for injection are named InjectDll OR InjectPID.. so is there
#include <InjectDll.au3> or <InjectPID.au3>?