Jump to content

Do command after finding value


BPM
 Share

Recommended Posts

Hello, this is what I am trying to do in my bot I am making

1. I want it to inject into a process, and find a value in it

2. Once that value drops below a certain point, I want it to press a key

3. Then keep checking value to see if it has dropped a certain point again

4. Repeat this

My problem is how to get the script to inject or attack to a process and seach values in it.

If I have say the hex address of the value, can the script search for that in a process?

If AutoIt simply cant do this, what could?

I really apprieciate your help on this one.

Thanks you

Link to comment
Share on other sites

Yes all this can be done.

Now AutoIt has memory functions built inn. Use those or use memory UDF written by Nomad, witch i myself like to use.

All of this has been done, with abit searching im sure you should be able to find script's exactly what you want to do, where you only would need to edit a few lines.

UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
Link to comment
Share on other sites

  • 2 weeks later...

Hi I need some more help on this one...

Here is what I have so far (Im bad at scripting I know)

#Include <WinAPI.au3>

If Not ProcessExists("process_name") Then Exit

Dim $procHwnd = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS, False, ProcessExists("process_name"))
If Not $procHwnd Then _Exit("Error while getting process handle!"); if we didn't get a valid 'access' handle then exit

Dim $pBuffer = DllStructCreate("byte[256]"), $iRead = 0

_WinAPI_ReadProcessMemory($procHwnd, 0x07B9EC28, DllStructGetPtr($pBuffer), 256, $iRead)
If Not $iRead Then _Exit("Error while reading data!")

MsgBox(0, "Data Read:", DllStructGetData($pBuffer, 1))

While 1
    If $pBuffer < 0 Then
        Send("{F2}")
    EndIf
WEnd

Func _Exit($s_Msg)
   
    MsgBox(0, "Error", $s_Msg)
    Exit
    
EndFunc

My question is, what is the value that it finds saved under what varable? Is it $pBuffer? My message box always resulted in a value of 0. I dont think it is reading the memory location right. When I searched the value in CE, it was under 2 bytes category.

And can someone make sure that my code telling it to hit F2 each time the value is below 0 is right? How can I set an interval for it to loop at? Because I want it to check about every 15 seconds or so.

"process_name" is the name of my running process I want it to find the value in.

If someone can please help me that'd be great. Im clueless with this memory location script thing. I didnt find a tut on just memory locations either :/

Edited by BPM
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...