i'm not a Autoit Pro coder, but i tried it ^^
i think in python it would be easier and i think something like this already exist.
and here my code snippet:
PHP Code:
#include <file.au3>
#include <array.au3>
; u must change $string, $mt2_process
$path = @scriptdir ;---Metin2 Ordner
$mt2_process = "metin2.exe"
$found_dll = _FileListToArray($path, '*.dll', 1) ;---path, extension ".dll", all files
$dll ="granny2.dll,devil.dll,DSETUP.dll,unicows.dll, python22.dll, mscoree.dll, msvcp60.dll" & _
"ilu.dll,artpclnt.dll, SpeedTreeRT.dll,MSVCRTD.dll,MSS32.dll,DSETUP.dll" ; known dlls, because the client also use some dynamic link libaries
$known_dll = stringsplit($dll, ',') ;split string to get the dll names
for $i = 1 to Ubound($known_dll)-1 step +1
local $iIndex = _ArraySearch($found_dll, $known_dll[$i],0,0,0) ; check, if $known_dll contains a dll from the client and delete this in $found_dll
If @error Then
MsgBox(0, "Not Found", '"' & $known_dll[$i] & '" was not found in the array.') ;for checking if it works
Else
MsgBox(0, "Found", '"' & $known_dll[$i] & '" was found in the array at position ' & $iIndex & ".");for checking if it works
local $size = _ArrayDelete($found_dll, $iIndex) ;if dll is found in $found_dll then delete it
EndIf
Next
$count = Ubound($found_dll)-1
if $count > 0 then ;if count of found_dll bigger than 0
msgbox(16, "Detected Hack", "Client detected some unknown Dll-Files") ;throw an exception and exit mt2 process
If ProcessExists($mt2_process) then
processClose($mt2_process) ;kill mt2 process
Endif
Else
msgbox(0, "No Hacks found", "Client starts") ;no hacks/dll found, start client
EndIf
now u must adapt it to your client that means, you must try to start the autoit script if the client starts. and i think this solution is not very safe because if somebody for example replace the granny2.dll with his hack, the autoit script won't detect it.
if you want the same for *.mix files here a code snippet:
PHP Code:
$found_mix = _FileListToArray($path, '*.mix', 1)
$count_mix = Ubound($found_mix)-1
if $count_mix > 0 Then
msgbox(16, "Detected Hack", "Client detected some Mix-files") ;throw an exception and exit mt2 process
If ProcessExists($mt2_process) then
processClose($mt2_process) ;kill mt2 process
Endif
Else
msgbox(0, "No Hacks found", "Client starts") ;no hacks/dll found, start client
EndIf
#script works, testet on my client
MfG