myown How do I cheat?
Reputation: 0
Joined: 11 Mar 2014 Posts: 9
|
Posted: Tue May 06, 2014 2:55 pm Post subject: Search Array of Byte vb.net |
|
|
hello how can Search Array of Byte in vb.net
i can in autoit but i wan in vb.net can some one help m
in autoit i use
| Code: |
Func _MemoryScan($ah_Handle, $pattern, $after = False, $iv_addrStart = 0x00400000, $iv_addrEnd = 0X0FFFFFFF, $step = 51200)
If Not IsArray($ah_Handle) Then
SetError(1)
Return -1
EndIf
$pattern = StringRegExpReplace($pattern, "[^0123456789ABCDEFabcdef.]", "")
If StringLen($pattern) = 0 Then
SetError(2)
Return -2
EndIf
For $addr = $iv_addrStart To $iv_addrEnd Step $step - (StringLen($pattern) / 2)
StringRegExp(_MemoryRead($addr, $ah_Handle, "byte[" & $step & "]"), $pattern, 1, 2)
If Not @error Then
If $after Then
Return StringFormat("0x%.8X", $addr + ((@extended - 2) / 2))
Else
Return StringFormat("0x%.8X", $addr + ((@extended - StringLen($pattern) - 2) / 2))
EndIf
EndIf
Next
Return -3
EndFunc ;==>_MemoryScan
Func _StringToArrayOfByte($String)
Local $AoB = StringToBinary($String)
Local $AntiHex = _StringBetween($AoB, "0x", "")
Return $AntiHex[0]
EndFunc ;==>_StringToArrayOfByte
Func _SEDEBUG()
Local $tagLUIDANDATTRIB = "int64 Luid;dword Attributes"
Local $count = 1
Local $tagTOKENPRIVILEGES = "dword PrivilegeCount;byte LUIDandATTRIB[" & $count * 12 & "]"
Local $call = DllCall("advapi32.dll", "int", "OpenProcessToken", "hwnd", _WinAPI_GetCurrentProcess(), "dword", 0x20, "int*", "")
Local $hToken = $call[3]
$call = DllCall("advapi32.dll", "int", "LookupPrivilegeValue", "str", "", "str", "SeDebugPrivilege", "int64*", "")
Local $iLuid = $call[3]
Local $TP = DllStructCreate($tagTOKENPRIVILEGES)
Local $LUID = DllStructCreate($tagLUIDANDATTRIB, DllStructGetPtr($TP, "LUIDandATTRIB"))
DllStructSetData($TP, "PrivilegeCount", $count)
DllStructSetData($LUID, "Luid", $iLuid)
DllStructSetData($LUID, "Attributes", $SE_PRIVILEGE_ENABLED)
$call = DllCall("advapi32.dll", "int", "AdjustTokenPrivileges", "hwnd", $hToken, "int", 0, "ptr", DllStructGetPtr($TP), "dword", 0, "ptr", "", "ptr", "")
EndFunc ;==>_SEDEBUG |
| Code: | _GUICtrlEdit_SetText($Adress_Array, "")
$String_Text = GUICtrlRead($Text_Input)
$Adress_Start = GUICtrlRead($Start_Adress_Input)
$Adress_End = GUICtrlRead($Stop_Adress_Input)
Do
$Result = _MemoryScan($Open, $String_Text, False, $Adress_Start, $Adress_End)
If $Result = -3 Then
ExitLoop
Else
_GUICtrlEdit_InsertText($Adress_Array, $Result & @CRLF, -1)
EndIf
$Adress_Start = $Result + 1
Until $Result = -3
EndIf
|
|
|