Willkommen |
|
myGully |
|
Links |
|
Forum |
|
|
|
15.01.11, 19:36
|
#1
|
Registriert seit: Dec 2009
Beiträge: 792
Bedankt: 49
|
AutoIt to VB.NET
Hallo, ich versuche grade ein kleines in AutoIt geschriebenes Tool nochmal in VB.NET nachzubauen und komme bei einem Abschnitt nicht weiter..vielleicht gibt es hier ja welche die beide Sprachen können (kann natürlich auch C# sein, ist ja eigentlich fast das selbe, außerdem gibts da dann auch Converter)
Also folgender AutoIt-Code:
Code:
If memread($mid, 0x56E2D, 'byte[2]') = '0x3EB2' Then
memwrite($mid, 0x56E2D, 'EB')
EndIf
Hier sind noch die beiden Funktionen(?):
Code:
Func memread($mid, $adress, $type = 'dword')
Local $struct = DllStructCreate($type)
DllCall($kernel32, 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
Return DllStructGetData($struct, 1)
EndFunc ;==>memread
Func memwrite($mid, $adress, $hex)
Local $struct = DllStructCreate('byte[' & BinaryLen('0x' & $hex) & ']')
For $i = DllStructGetSize($struct) To 1 Step - 1
DllStructSetData($struct, 1, BinaryMid('0x' & $hex, $i, 1), $i)
Next
Local $x = DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', 0x40, 'dword*', 0)
DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', 0)
DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', $x[5], 'dword*', 0)
EndFunc ;==>memwrite
Was ich auch nicht verstehe ist, wie kann man in einer Funktion eine DLL aufrufen? In VB.NET gibt es ja die Read-/ WriteProcessMemory APIs. Muss ich also nur die verwenden und brauch gar keine Funktionen oder wie?
__________________
To succeed you have to stop being ordinary and be legen - wait for it - dary.
|
|
|
Forumregeln
|
Du kannst keine neue Themen eröffnen
Du kannst keine Antworten verfassen
Du kannst keine Anhänge posten
Du kannst nicht deine Beiträge editieren
HTML-Code ist Aus.
|
|
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:53 Uhr.
().
|