Jump to content

hi! Hello, everyone! Would like to ask, this is aarido source code, with AU3 how to express? thank you - (Moved)


Go to solution Solved by AndSoW,

Recommended Posts

Posted (edited)

hi! Hello, everyone! Would like to ask, this is aarido source code, with AU3 how to express? thank you

aarido source code:

import process;
import console;

prcs = process.find("WeChat.exe")
Datapointer = 0x0737CF54//The address of the structure of the two-dimensional code, since the offset has been found, the address will be changed to offset the corresponding address on the line
Addres = prcs.readNumber(Datapointer)
long = prcs.readNumber(Datapointer + 0x4)
data = prcs.readString(Addres, long)
string.save("D:\aardio\temp\1.png", data)
string.save("D:\aardio\temp\1.txt", long)

At present, I have used AU3 to calculate the address and length using the cardinality, and can not use the address and length to obtain the data returned by dll again!

autoit source code:

#NoTrayIcon
#RequireAdmin
$CurProcID = ProcessExists("WeChat.exe")
If Not $CurProcID Then
    MsgBox(4096, "", "not process.")
    Exit
EndIf

$Handle = _MemoryOpen($CurProcID)
$Addres=0x0737CF54 
$Address = _MemoryRead("0x" & Hex($Addres), $Handle)
$long = _MemoryRead("0x" & Hex($Addres+0x4), $Handle)

;----------------------------------------------------------------------------

;So here is this code and I don't know how to express it in AU3, okay:

;data = prcs.readString(Addres, long)

;-----------------------------------------------------------------------------

$data = DllCall("kernel32.dll", "int", "GetCurrentCw", 'int', $Handle,"dword", DllStructGetPtr($Address),"ptr",DllStructGetPtr($long),"wstr","");I can't get the data here

ConsoleWrite($data);I can't get the data here
MsgBox(0,"",$long)


;Local $hFile = FileOpen('D:\aardio\temp\1.png',2+8+16)
;FileWrite($hFile, $data)
;FileClose($hFile)
 

;=================================================================================================
Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')
    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf
    Local $v_Buffer = DllStructCreate($sv_Type)
    If @Error Then
        SetError(@Error + 1)
        Return 0
    EndIf
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If Not @Error Then
        Local $v_Value = DllStructGetData($v_Buffer, 1)
        Return $v_Value
    Else
        SetError(6)
        Return 0
    EndIf
EndFunc

Edited by AndSoW
  • Solution
Posted (edited)
2 hours ago, Zedna said:

I think maybe something like this (only concept) ...

$type = 'byte[' & $long & ']'
$data = _MemoryRead("0x" & Hex($Addres+0x8), $Handle, $type)
; ...

 

thank!

Edited by AndSoW

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
  • Recently Browsing   0 members

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