:HH: Hack-Pack *-*

05/15/2008 23:47 UPSman2#31
what evans referring to is that its to slow to search through thousands of memory address within 2 or 3 seconds (like cheat engine does), but if you have a exact address then it returns it in miliseconds

although i do think its possible just noones done it yet
05/15/2008 23:50 Hiyoal#32
OO, thats what ephe was referring to. Yea, If you are to use a scripting language to search memory regions, then it takes ages. But I am using Joek's Memory Tables which are the exact specific static addresses.

Hiyoal :)
05/16/2008 00:54 high6#33
Actually Readprocessmemory and writeprocessmemory are slow if you do byte by byte. Usually they use something else or read a block of memory and go through it and read another block, etc.
05/16/2008 01:02 UPSman2#34
"read a block of memory"
is there a dll function that does that or is it more complex, which in that case could you try to explain to me because I'm willing to listen and learn.
05/16/2008 01:28 high6#35
Quote:
Originally Posted by UPSman2 View Post
"read a block of memory"
is there a dll function that does that or is it more complex, which in that case could you try to explain to me because I'm willing to listen and learn.
instead of reading 1 byte you read say 10000 bytes. then you go through the 10000 bytes byte array and search.
05/16/2008 01:37 UPSman2#36
but how do you load 10000 bytes at once instead of going through byte by byte?
05/16/2008 02:04 high6#37
Quote:
Originally Posted by UPSman2 View Post
but how do you load 10000 bytes at once instead of going through byte by byte?
Code:
[DllImport("kernel32.dll")]
private static extern int ReadProcessMemory (int hProcess, int lpBaseAddress, int [B]lpBuffer[/B], int [B]nSize[/B], int lpNumberOfBytesWritten);
05/16/2008 05:54 Hiyoal#38
Lol, I dont think this is capable with AutoIt UPSMan, I have only ever found this possible in C# and the other more powerful languages.
05/16/2008 06:21 evanxxxm#39
try this: (AHK)
it reads 100 byte start from 0x10000
problem is, i dont know how to handle 100 bytes and convert it to useful datas...

screenshot:
[Only registered and activated users can see links. Click Here To Register...]

Code:
WinGet, PID, PID, New
ProcessHandle := DllCall("OpenProcess", "int", 24, "char", 0, "UInt", PID, "UInt")  

GrantedCapacity := VarSetCapacity(Output, 100)
Read_MemAdress = 0x100000     

DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", Read_MemAdress, "str", Output, "Uint", GrantedCapacity, "Uint *", BytesRead)

Bin2Hex(hexOut, output, bytesread)
msgbox, %hexOut% 


Bin2Hex(ByRef @hex, ByRef @bin, _byteNb=0)
{
   local intFormat, dataSize, dataAddress, granted, x

   intFormat = %A_FormatInteger%

   SetFormat Integer, Hex

   dataSize := VarSetCapacity(@bin)
   If (_byteNb < 1 or _byteNb > dataSize)
   {
      _byteNb := dataSize
   }
   dataAddress := &@bin

   Loop %_byteNb%
   {
     
      x := *dataAddress + 0x100
      StringRight x, x, 2   ; 2 hex digits
      StringUpper x, x
      @hex = %@hex%%x%
      dataAddress++   ; Next byte
   }
   
   SetFormat Integer, %intFormat%

   Return _byteNb
}
05/16/2008 08:20 xnawrs#40
Thanks.
05/16/2008 09:24 Hiyoal#41
For Everyone Looking at this now, AutoIt now has capabilities of finding pixel colors in the background (minimized client) all thx to my suggestion!!!

Sometime this year, I will try to put up "The New SV"!! :p If I have time.

Otherwise, Ive finished the zoom hack, duel hack, experience hack and client color effects hack.

Hiyoal :D:D:D:D:D
05/16/2008 22:04 UPSman2#42
new update of autoit i see....
05/16/2008 22:26 ephe#43
w00t! I'm looking forward to it being implemented in AHK as well! Just today (and yesterday and two days ago...) I was looking for a way to let autohotkey somehow access the video of a window in the background, to no avail, but this is great news. No need to play with memory addresses anymore now :D
By the way, are you sure it's really "minimized"? Don't you really mean "in the background"? That's a totally different story.

@Evan: I suppose you'd need to split the 100byte variable into an array sized 25 and do searches inside that. You would probably, in an ideal situation, get performance improvements of maybe 20 times?

EDIT: where exactly do you see a background windows pixelsearch function in the latest AutoIT update? I couldn't find it anywhere...
05/16/2008 23:06 Hiyoal#44
You will have to wait until the "Proper release" because the release is still in Beta stages, but yes...It will find pixels in the background, its exactly what I asked for and the response was "We can implement this in the next patch update".

Hiyoal
05/17/2008 03:08 evanxxxm#45
ephe@
the example only examine 100bytes
think of the situation as 1000000+ addresses
and if u want to split the string, it will becomes lots and lots of arrays
and if so, back to the original problem, it takes lots and lots of time to loop read through all those 250000+ addresses
actually if even thats fast, for example i got the value i want "11 22 33 44", how to locate it back to what address its from?

if autoIT can read color minimized/background, i guess its time for me to convert my AHK
or its the time for me to step back