myown How do I cheat?
Reputation: 0
Joined: 11 Mar 2014 Posts: 9
|
Posted: Wed Mar 12, 2014 12:55 pm Post subject: can write it in vb.net or C# |
|
|
this code in autoit to bypass xtrap
| Code: |
if not ProcessExists("GP") = True then
MsgBox (0, "", "Run GP")
endif
Do
sleep (100)
until ProcessExists("GP") = True
MsgBox (0, "", "Found GP")
MsgBox (0, "", "Done!")
sleep (1000)
_XTrapBypass()
AdlibRegister ("_XTrapBypass")
While True
sleep (100)
Wend
Func _XTrapBypass()
_Soul_WriteProcessMemory ("GP.exe",_GetProcAddress("kernel32.dll", "ptr", "K32EnumProcesses"),0x90000CC2,"dword")
_Soul_WriteProcessMemory("GP.exe", 0x00410858, "X6va20","char[7]")
sleep (500)
Exit
EndFunc
Func _GetProcAddress ($Dll,$Type,$function)
local $returntype
$dllcall = DllCall("kernel32.dll", "handle", "LoadLibraryW", "wstr", $dll)
$address = DllCall($dll, $Type, "GetProcAddress", $Type, $dllcall[0], "str", $function)
Return $address[$returntype]
endfunc
Func _Soul_WriteProcessMemory ($hprocess,$Addy,$Val,$type = "dword")
$kernel32 = DllOpen("kernel32.dll")
If @error Then Return SetError(1, "", False)
$hprocess = DllCall($kernel32, "DWORD", "OpenProcess", "DWORD", 0x1F0FFF, "int", 0, "DWORD", ProcessExists($hprocess))
If @error Then Return SetError(2, "", False)
local $n_TypVa = DllStructCreate($type)
If @error Then Return SetError(3, "", False)
DllStructSetData($n_TypVa, 1, $Val)
If @error Then Return SetError(4, "", False)
DllCall("kernel32.dll", "BOOL", "WriteProcessMemory", "int", $hprocess[0], "DWORD", $Addy, "ptr", DllStructGetPtr($n_TypVa), "int", DllStructGetSize($n_TypVa), "int", 0)
If @error Then Return SetError(5, "", False)
DllCall($kernel32, "BOOL", "CloseHandle", "DWORD", $hprocess[0])
If @error Then Return SetError(6, "", False)
DllClose($kernel32)
If @error Then Return SetError(7, "", False)
Return SetError(0, "", True)
EndFunc
EndSwitch
WEnd
Exit
|
i try in vb.net use this code
| Code: |
<DllImport("kernel32.dll")> _
Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInt32, ByVal bInheritHandle As Int32, ByVal dwProcessId As UInt32) As IntPtr
End Function
<DllImport("kernel32.dll")> _
Public Shared Function CloseHandle(ByVal hObject As IntPtr) As Int32
End Function
<DllImport("kernel32.dll")> _
Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesRead As IntPtr) As Int32
End Function
<DllImport("kernel32.dll")> _
Public Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
End Function
Private Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Single
Public Shared Sub Writememory(ByVal ProcessName As String, ByVal Address As Integer, ByVal Value As Single, ByVal nsize As Integer)
If ProcessName.EndsWith(".exe") Then
ProcessName = ProcessName.Replace(".exe", "")
End If
Dim processesByName() As Process = Process.GetProcessesByName(ProcessName)
Dim ptr As IntPtr = CType(OpenProcess(127231, 0, processesByName(0).Id), IntPtr)
If Not (ptr = IntPtr.Zero) Then
Dim lpBaseAddress As Integer = Address
Dim lpBuffer As Single = Value
Dim lpNumberOfBytesWritten As Integer = 0
WriteProcessMemory(CType(ptr, Integer), lpBaseAddress, lpBuffer, nsize, lpNumberOfBytesWritten)
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Writememory("GP.exe", &H410858, "X6va20", 7)
If Not (Process.GetProcessesByName("Xtrap.xt").Length = 0) Then
Writememory("GP.exe", &H410858, "X6va20", 7)
End If
End Sub
|
but not work
|
|