Change Process memory
Change Process memory
Help me please, I need a function, which will change process memony as you see. For example, i have an adress 000043942098. Shoud i tranlate it to hexadecimal number system?
Re: Change Process memory
There is a good library made by RHCP for interacting with memory. It has read nad change functions too. Look here: https://autohotkey.com/boards/viewtopic ... 77&p=67167
DRAKON-AutoHotkey: Visual programming for AutoHotkey.
Re: Change Process memory
I think thats not what i need.I need functions like in programs Artmoney or CheatEngine. I need something like this
WriteProcessMemory(title,addresse,wert,size)
{
VarSetCapacity(idvar,32,0)
VarSetCapacity(processhandle,32,0)
VarSetCapacity(value, 32, 0)
NumPut(wert,value,0,Uint)
address=%addresse%
WinGet ,idvar,PID,%title%
processhandle:=DllCall("OpenProcess","Uint",0x38,"int",0,"int",idvar)
Bvar:=DllCall("WriteProcessMemory","Uint",processhandle,"Uint",address+0,"Uint",&value,"Uint",size,"Uint",0)
}
But i dont know what addresse to write if i write 000043942098, 0x43942098, 0x(in hexadecimal number system) - dont works. Or something like this
read(address, type := "UInt", aOffsets*)
{
VarSetCapacity(buffer, bytes := this.aTypeSize[type])
if !DllCall("ReadProcessMemory","UInt", this.hProcess, "UInt", aOffsets.maxIndex() ? this.getAddressFromOffsets(address, aOffsets*) : address, "Ptr", &buffer, "UInt", bytes, "Ptr",0)
return !this.hProcess ? "Handle Is closed: " this.hProcess : "Fail"
return numget(buffer, 0, Type)
}
write(address, value, type := "Uint", aOffsets*)
{
if !bytes := this.aTypeSize[type]
return "Non Supported data type" ; Unsigned64 bit not supported by AHK
VarSetCapacity(buffer, bytes)
NumPut(value, buffer, 0, type)
return DllCall("WriteProcessMemory", "UInt", this.hProcess, "UInt", aOffsets.maxIndex() ? this.getAddressFromOffsets(address, aOffsets*) : address, "Ptr", &buffer, "Uint", bytes, "Ptr", 0)
}
WriteProcessMemory(title,addresse,wert,size)
{
VarSetCapacity(idvar,32,0)
VarSetCapacity(processhandle,32,0)
VarSetCapacity(value, 32, 0)
NumPut(wert,value,0,Uint)
address=%addresse%
WinGet ,idvar,PID,%title%
processhandle:=DllCall("OpenProcess","Uint",0x38,"int",0,"int",idvar)
Bvar:=DllCall("WriteProcessMemory","Uint",processhandle,"Uint",address+0,"Uint",&value,"Uint",size,"Uint",0)
}
But i dont know what addresse to write if i write 000043942098, 0x43942098, 0x(in hexadecimal number system) - dont works. Or something like this
read(address, type := "UInt", aOffsets*)
{
VarSetCapacity(buffer, bytes := this.aTypeSize[type])
if !DllCall("ReadProcessMemory","UInt", this.hProcess, "UInt", aOffsets.maxIndex() ? this.getAddressFromOffsets(address, aOffsets*) : address, "Ptr", &buffer, "UInt", bytes, "Ptr",0)
return !this.hProcess ? "Handle Is closed: " this.hProcess : "Fail"
return numget(buffer, 0, Type)
}
write(address, value, type := "Uint", aOffsets*)
{
if !bytes := this.aTypeSize[type]
return "Non Supported data type" ; Unsigned64 bit not supported by AHK
VarSetCapacity(buffer, bytes)
NumPut(value, buffer, 0, type)
return DllCall("WriteProcessMemory", "UInt", this.hProcess, "UInt", aOffsets.maxIndex() ? this.getAddressFromOffsets(address, aOffsets*) : address, "Ptr", &buffer, "Uint", bytes, "Ptr", 0)
}
Who is online
Users browsing this forum: DataLife, ShatterCoder and 210 guests