elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  VB.NET PointerWrite pointers LVL4
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: VB.NET PointerWrite pointers LVL4  (Leído 5,967 veces)
jonnyHS

Desconectado Desconectado

Mensajes: 5


Ver Perfil
VB.NET PointerWrite pointers LVL4
« en: 1 Octubre 2013, 03:33 am »

Buenas noches, hoy he entrado a este foro buscando una solucion a mi gran problema: Un modulo PounterWrite para el Visual Estudio 2012.

He tratado ya con 3 modulos diferentes hasta ya volverme loco  :-(. Investigando he visto que todas las personas o la mayoría usan el Visual Studio 2010 Express o Full, para ver me descargue el Express y aun así no me funciono.

He aqui uno de los modulos que yo use:

Código:
'VB.NET Module 
'Author : Cless
'How to use Read/Write Pointer
'Example Read
'       Me.Text = ReadPointerInteger(Game exe name, &HPointer,&HOffset).ToString()
'
'       Me.Text = ReadPointerInteger("gta_sa", &HB71A38,&H540).ToString()
'       Or
'       Me.Text = ReadPointerInteger("gta_sa", &HB71A38,&H540,&H544).ToString()
'Example Write
'       WritePointerInteger(Game exe name,&HPointer,Value,&HOffset)
'
'       WritePointerInteger("gta_sa",&HB71A38,1000,&H540)
'       Or
'       WritePointerInteger("gta_sa",&HB71A38,1000,&H540, &H544)

Module Trainer
    Private Declare Function ReadMemoryByte Lib "kernel32" Alias "ReadProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Byte, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Byte
    Private Declare Function ReadMemoryInteger Lib "kernel32" Alias "ReadProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Integer, Optional ByVal Size As Integer = 4, Optional ByRef Bytes As Integer = 0) As Integer
    Private Declare Function ReadMemoryFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Single, Optional ByVal Size As Integer = 4, Optional ByRef Bytes As Integer = 0) As Single
    Private Declare Function ReadMemoryDouble Lib "kernel32" Alias "ReadProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Double, Optional ByVal Size As Integer = 8, Optional ByRef Bytes As Integer = 0) As Double

    Private Declare Function WriteMemoryByte Lib "kernel32" Alias "WriteProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Byte, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Byte
    Private Declare Function WriteMemoryInteger Lib "kernel32" Alias "WriteProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Integer, Optional ByVal Size As Integer = 4, Optional ByRef Bytes As Integer = 0) As Integer
    Private Declare Function WriteMemoryFloat Lib "kernel32" Alias "WriteProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Single, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Single
    Private Declare Function WriteMemoryDouble Lib "kernel32" Alias "WriteProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Double, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Double

    Public Function ReadByte(ByVal EXENAME As String, ByVal Address As Integer) As Byte
        Dim Value As Byte
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                ReadMemoryByte(Handle, Address, Value)
            End If
        End If
        Return Value
    End Function

    Public Function ReadInteger(ByVal EXENAME As String, ByVal Address As Integer) As Integer
        Dim Value As Integer
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                ReadMemoryInteger(Handle, Address, Value)
            End If
        End If
        Return Value
    End Function

    Public Function ReadFloat(ByVal EXENAME As String, ByVal Address As Integer) As Single
        Dim Value As Single
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                ReadMemoryFloat(Handle, Address, Value)
            End If
        End If
        Return Value
    End Function

    Public Function ReadDouble(ByVal EXENAME As String, ByVal Address As Integer) As Double
        Dim Value As Double
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                ReadMemoryByte(Handle, Address, Value)
            End If
        End If
        Return Value
    End Function

    Public Function ReadPointerByte(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal ParamArray Offset As Integer()) As Byte
        Dim Value As Byte
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    ReadMemoryInteger(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                ReadMemoryByte(Handle, Pointer, Value)
            End If
        Else
            MsgBox("can't find process")
        End If
        Return Value
    End Function

    Public Function ReadPointerInteger(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal ParamArray Offset As Integer() ) As Integer
        Dim Value As Integer
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    ReadMemoryInteger(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                ReadMemoryInteger(Handle, Pointer, Value)
            End If
        End If
        Return Value
    End Function

    Public Function ReadPointerFloat(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal ParamArray Offset As Integer()) As Single
        Dim Value As Single
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    ReadMemoryInteger(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                ReadMemoryFloat(Handle, Pointer, Value)
            End If
        End If
        Return Value
    End Function

    Public Function ReadPointerDouble(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal ParamArray Offset As Integer()) As Double
        Dim Value As Double
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    ReadMemoryInteger(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                ReadMemoryDouble(Handle, Pointer, Value)
            End If
        End If
        Return Value
    End Function

    Public Sub WriteByte(ByVal EXENAME As String, ByVal Address As Integer, ByVal Value As Byte)
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                WriteMemoryByte(Handle, Address, Value)
            End If
        End If
    End Sub

    Public Sub WriteInteger(ByVal EXENAME As String, ByVal Address As Integer, ByVal Value As Integer)
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                WriteMemoryInteger(Handle, Address, Value)
            End If
        End If
    End Sub

    Public Sub WriteFloat(ByVal EXENAME As String, ByVal Address As Integer, ByVal Value As Single)
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                WriteMemoryFloat(Handle, Address, Value)
            End If
        End If
    End Sub

    Public Sub WriteDouble(ByVal EXENAME As String, ByVal Address As Integer, ByVal Value As Double)
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                WriteMemoryDouble(Handle, Address, Value)
            End If
        End If
    End Sub

    Public Sub WritePointerByte(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal Value As Byte, ByVal ParamArray Offset As Integer())
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    ReadMemoryInteger(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                WriteMemoryByte(Handle, Pointer, Value)
            End If
        End If
    End Sub

    Public Sub WritePointerInteger(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal Value As Integer, ByVal ParamArray Offset As Integer())
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    ReadMemoryInteger(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                WriteMemoryInteger(Handle, Pointer, Value)
            End If
        End If
    End Sub

    Public Sub WritePointerFloat(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal Value As Single, ByVal ParamArray Offset As Integer())
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    ReadMemoryInteger(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                WriteMemoryFloat(Handle, Pointer, Value)
            End If
        End If
    End Sub

    Public Sub WritePointerDouble(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal Value As Double, ByVal ParamArray Offset As Integer())
        If Process.GetProcessesByName(EXENAME).Length <> 0 Then
            Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
            If Handle <> 0 Then
                For Each I As Integer In Offset
                    ReadMemoryInteger(Handle, Pointer, Pointer)
                    Pointer += I
                Next
                WriteMemoryDouble(Handle, Pointer, Value)
            End If
        End If
    End Sub
End Module


Y para escribir en la memoria:

Código:
WritePointerInteger("proceso",&HBaseaddress,Valor,&HOffset1, &HOffset2, &HOffset3, &HOffset4) 

Pero solo he visto en unos pocos vídeos que he encontrado que funciona con el Visual Studio 2010.

¿Ayuda para escribir en pointers de nivel 4?


En línea

Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: VB.NET PointerWrite pointers LVL4
« Respuesta #1 en: 5 Octubre 2013, 01:30 am »

Lo que hace el offset es que desde un address (usualmente static, con respecto a lo que buscas) genera otros address para llegar al address final, lo cual sería así:

Tienes el static address

luego tienes que leer el valor del [static addres + offset1]
A ese resultado -> ResultadoAddOff1

le tienes que sumar offset2 y leerlo

[ResultadoAddOff1 + offset2] -> ResultadoAddOff2

etc etc, así al final obtendrás el address final con su valor, lo cual podrías hacer un bucle de ReadProcessMemory, pasándole por array la cantidad de offset y obteniendo la longitud del mismo array para el bucle, yo hice uno hace mucho para un juego, pero no recuerdo donde lo tengo :S también había hecho un FindPattern xDDDD, todo es posible ;), espero que ésto te sea de ayuda.


En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
jonnyHS

Desconectado Desconectado

Mensajes: 5


Ver Perfil
Re: VB.NET PointerWrite pointers LVL4
« Respuesta #2 en: 5 Octubre 2013, 21:00 pm »

Entonces, tengo que sumar todos los Offsets en orden?

Son 4 así que seria algo como esto:

Base + O1
Base1 + O2
Base2 + O3
Base3 + O4

¿Y entonces con un modulo MemoryWrite escribo en el resultado el valor que quiero?

-----------------------------------------------------------------------------------
Editado:

Seria algo como esto?

Código:
WritePointerInteger("proceso",&HBaseaddress + &HOffset1 + &HOffset2 + &HOffset3 + &HOffset4, ,Valor)



--------------------------------------------------------------------------------

Si tienes algún modulo de ejemplo por favor pásamelo.


--------------------------------------------------------------------------------
Editado

Después de mucha búsqueda he encontrado un método como el que tu me has explicado mira:

Para la Form:

Código:
  'Variables
    Dim ProcessName As String = "Emuclient"
    Dim WindowClass As String = "S4 Client" 'If you wanna hack another game than AVA you have to replace this string with the window class name of your game
    'You can use google to find out how you can get the window class for the game you wanna hack with this trainer
    'The easiest way to get the window class is by using WinSpy++ (Spy++)
    Dim p As Process = Nothing
    Dim RealName As String
    Dim Xpos As Integer
    Dim Ypos As Integer
    Dim NewPoint As New System.Drawing.Point
    Dim Panel1MouseDown As Boolean = False 'This variable was made to avoid bugs if the window gets moved while pressing the hotkey for setting it to center screen.

    'Function for detecting key presses
    Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Integer) As Integer

Entonces para escribir:

Código:
Try
            Dim Adr1 As Int32 = Memory.ReadInt32(p, &HB328B0) 'Address
            Adr1 = Memory.ReadInt32(p, Adr1 + &H210) 'Offset1
            Adr1 = Memory.ReadInt32(p, Adr1 + &H8) 'Offset2 (Add more offsets if needed)
            Adr1 = Memory.ReadInt32(p, Adr1 + &H138) 'Offset1


            'ATTENTION: The last offset MUST be added in the writing part (in this example the last offset is &H123)
            'Replace the value (999) with what you want to change it to and the method (WriteInt32) with the method for the value type of the value you wanna change.
            WriteInt32(p, Adr1 + &H90, 1167867904)

        Catch ex As Exception 'If something failed
            MessageBox.Show("Writing to memory failed: " & vbCrLf & ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try

PD: no me sirve :L, que hago mal?

--------------------------------------------------------------------------------
He intentado hacerlo con el original también y esto es lo que me sale:

Código:
Dim Adress As Integer = ReadPointerInteger("SpiderSolitaire", &H942B8)
        Adress = ReadPointerInteger("SpiderSolitaire", &H942B8 + &H10)
        Adress = ReadPointerInteger("SpiderSolitaire", &H942B8 + &H7C)
        Adress = ReadPointerInteger("SpiderSolitaire", &H942B8 + &HC)
        Adress = ReadPointerInteger("SpiderSolitaire", &H942B8 + &H40)
        WritePointerInteger("SpiderSolitaire", Adress + &H74, 50000)


y no sirve :(, ¿una ayuda?
« Última modificación: 6 Octubre 2013, 17:41 pm por jonnyHS » En línea

Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: VB.NET PointerWrite pointers LVL4
« Respuesta #3 en: 7 Octubre 2013, 06:01 am »

Es muy raro que yo comparta código de hacks/cheats, pero aquí tienes el módulo completo, son del 2010 o antes, así que no están optimizados:

Código
  1. Option Explicit
  2.  
  3. Private Type tOffset
  4.    HexValue As Variant
  5.    DecimValue As Long
  6.    HexAddress As Variant
  7.    DecimAddress As Long
  8. End Type
  9.  
  10. Private NumOffsets As Long
  11. Private Offsets() As tOffset
  12. Private ActualOffsetVal As Variant
  13.  
  14.  
  15. Private FAddressHex As Variant
  16. Private FAddressDecim As Long
  17. Private FValueHex As Variant
  18. Private FValueDecim As Long
  19.  
  20. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  21. Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal Hwnd As Long, lpdwProcessId As Long) As Long
  22. Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  23.  
  24. Public Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  25. Public Declare Function WriteProcessMem Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  26.  
  27. Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
  28. Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
  29. Private Declare Function Hotkey Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
  30.  
  31.  
  32. Public L(1 To 8) As Long, lR(1 To 8) As Long, lS(1 To 8) As Long
  33. Public v(1 To 8) As Variant
  34. Public OffSet(1 To 8) As Variant
  35.  
  36. Public Pass As String
  37.  
  38. Public Function MiseryCalc(ByVal Address As Long, ParamArray TheOffsets() As Variant) As Variant
  39. 'On Error GoTo Err:
  40.  
  41. Dim i As Byte
  42. Dim handle As Long
  43. Dim ProcessID As Long
  44. Dim ProcessHandle As Long
  45. Dim PointerValue As Long
  46. Dim AddressDec As Long
  47. Dim AddressHex As String
  48.  
  49. 'MsgBox UBound(TheOffsets) '0, 1
  50. NumOffsets = UBound(TheOffsets) + 1
  51. 'MsgBox NumOffsets
  52. 'Exit Sub
  53.  
  54. ReDim Offsets(NumOffsets)
  55.  
  56. For i = 1 To NumOffsets
  57.    ActualOffsetVal = TheOffsets(i - 1)
  58.    'MsgBox ActualOffsetVal
  59.  
  60.    Offsets(i).HexValue = "&H" & ActualOffsetVal
  61.    Offsets(i).DecimValue = "&H" & ActualOffsetVal
  62. Next i
  63.  
  64. 'handle = FindWindow(vbNullString, "Argentum Online")
  65. 'GetWindowThreadProcessId handle, ProcessID
  66. 'ProcessHandle = OpenProcess(&H1F0FFF, True, ProcessID)
  67. ProcessHandle = myHandle
  68.  
  69. For i = 1 To NumOffsets
  70.    If i = 1 Then
  71.        ReadProcessMem ProcessHandle, CLng(Address), PointerValue, 4&, 0
  72.    Else
  73.        ReadProcessMem ProcessHandle, Offsets(i - 1).DecimAddress, PointerValue, 4&, 0
  74.    End If
  75.    AddressDec = PointerValue + Offsets(i).DecimValue
  76.    Offsets(i).DecimAddress = AddressDec
  77.    Offsets(i).HexAddress = Hex(AddressDec)
  78. Next i
  79.  
  80. FAddressDecim = Offsets(NumOffsets).DecimAddress
  81. ReadProcessMem ProcessHandle, FAddressDecim, FValueDecim, 4&, 0
  82.  
  83. FValueDecim = FValueDecim + 0
  84.  
  85. FAddressHex = Hex(AddressDec)
  86. FValueHex = Hex(FValueDecim)
  87.  
  88. MiseryCalc = FAddressDecim
  89.  
  90. 'CloseHandle ProcessHandle
  91.  
  92. 'Exit Function
  93. 'Err:
  94. '    Exit Function
  95. End Function
  96.  
  97. Public Function MiseryCalc2(ByVal Address As Long, ParamArray TheOffsets() As Variant) As Variant
  98. 'On Error GoTo Err:
  99.  
  100. Dim i As Byte
  101. Dim handle As Long
  102. Dim ProcessID As Long
  103. Dim ProcessHandle As Long
  104. Dim PointerValue As Long
  105. Dim AddressDec As Long
  106. Dim AddressHex As String
  107.  
  108. 'MsgBox UBound(TheOffsets) '0, 1
  109. NumOffsets = UBound(TheOffsets) + 1
  110. 'MsgBox NumOffsets
  111. 'Exit Sub
  112.  
  113. ReDim Offsets(NumOffsets)
  114.  
  115. For i = 1 To NumOffsets
  116.    ActualOffsetVal = TheOffsets(i - 1)
  117.    'MsgBox ActualOffsetVal
  118.  
  119.    Offsets(i).HexValue = ActualOffsetVal
  120.    Offsets(i).DecimValue = ActualOffsetVal
  121. Next i
  122.  
  123. 'handle = FindWindow(vbNullString, "Argentum Online")
  124. 'GetWindowThreadProcessId handle, ProcessID
  125. 'ProcessHandle = OpenProcess(&H1F0FFF, True, ProcessID)
  126. ProcessHandle = myHandle
  127.  
  128. For i = 1 To NumOffsets
  129.    If i = 1 Then
  130.        ReadProcessMem ProcessHandle, Address, PointerValue, 4&, 0
  131.    Else
  132.        ReadProcessMem ProcessHandle, Offsets(i - 1).DecimAddress, PointerValue, 4&, 0
  133.    End If
  134.    AddressDec = PointerValue + Offsets(i).DecimValue
  135.    Offsets(i).DecimAddress = AddressDec
  136.    Offsets(i).HexAddress = Hex(AddressDec)
  137. Next i
  138.  
  139. FAddressDecim = Offsets(NumOffsets).DecimAddress
  140. ReadProcessMem ProcessHandle, FAddressDecim, FValueDecim, 4&, 0
  141.  
  142. FValueDecim = FValueDecim + 0
  143.  
  144. FAddressHex = Hex(AddressDec)
  145. FValueHex = Hex(FValueDecim)
  146.  
  147. MiseryCalc2 = FAddressDecim
  148.  
  149. 'CloseHandle ProcessHandle
  150.  
  151. 'Exit Function
  152. 'Err:
  153. '    Exit Function
  154. End Function
  155.  
  156. Public Function CalcularBytes(ByVal Address As Long) As String
  157. Dim i As Byte
  158. Dim AddressHex As Variant
  159. Dim NAH As Variant
  160.  
  161. AddressHex = Hex(Address)
  162.  
  163. AddressHex = "0000000" & (AddressHex)
  164.  
  165. NAH = Right(AddressHex, 8)
  166.  
  167. 'jne 12345678
  168. 'XX -XX - L2, L1 - L4, L3 - L6, L5 - L8, L7
  169.  
  170. For i = 1 To 8
  171.    v(9 - i) = "&H" & Mid(NAH, i, 1)
  172. Next i
  173.  
  174. OffSet(1) = &H3
  175. 'OffSet(2) = &H6
  176.  
  177. 'OffSet(3) = &HA
  178. 'OffSet(4) = &H2
  179.  
  180. OffSet(5) = &H7
  181. OffSet(6) = &HB
  182.  
  183. OffSet(7) = &HF
  184. OffSet(8) = &HF
  185.  
  186. For i = 1 To 8
  187.    L(i) = L(i) + v(i) + OffSet(i)
  188.  
  189.    If L(i) > &HF Then
  190.        lR(i) = (L(i) - &H10)
  191.  
  192.  
  193.        If i <> 8 Then
  194.            lS(i) = (L(i) - lR(i))
  195.            L(i + 1) = L(i + 1) + (lS(i) / &H10)
  196.        End If
  197.  
  198.        '//FIX
  199.        L(i) = lR(i)
  200.    End If
  201. Next i
  202.  
  203. 'XX - XX - L2, L1 - L4, L3 - L6, L5 - L8, L7
  204. 'CalcularBytes = "0F - " & _
  205.                 "85 - " & _
  206.                 Hex(L(2)) & Hex(L(1)) & " - " & _
  207.                 Hex(L(4)) & Hex(L(3)) & " - " & _
  208.                 Hex(L(6)) & Hex(L(5)) & " - " & _
  209.                 Hex(L(8)) & Hex(L(7))
  210.  
  211. '0F 85 FC 04 00 00
  212. '0x0 4  F C  85 0F
  213. '  4,3  2,1  85 0F
  214. CalcularBytes = Hex(L(4)) & Hex(L(3)) & Hex(L(2)) & Hex(L(1)) & "850F"
  215. End Function
  216.  
  217. Public Function CalcularBytes2(ByVal Address As Long) As String
  218. Dim i As Byte
  219. Dim AddressHex As Variant
  220. Dim NAH As Variant
  221.  
  222. AddressHex = Hex(Address)
  223.  
  224. AddressHex = "0000000" & (AddressHex)
  225.  
  226. NAH = Right(AddressHex, 8)
  227.  
  228. 'jne 12345678
  229. 'XX -XX - L2, L1 - L4, L3 - L6, L5 - L8, L7
  230.  
  231. For i = 1 To 8
  232.    v(9 - i) = "&H" & Mid(NAH, i, 1)
  233. Next i
  234.  
  235. OffSet(1) = &H3
  236. 'OffSet(2) = &H6
  237.  
  238. 'OffSet(3) = &HA
  239. 'OffSet(4) = &H2
  240.  
  241. OffSet(5) = &H7
  242. OffSet(6) = &HB
  243.  
  244. OffSet(7) = &HF
  245. OffSet(8) = &HF
  246.  
  247. For i = 1 To 8
  248.    L(i) = L(i) + v(i) + OffSet(i)
  249.  
  250.    If L(i) > &HF Then
  251.        lR(i) = (L(i) - &H10)
  252.  
  253.  
  254.        If i <> 8 Then
  255.            lS(i) = (L(i) - lR(i))
  256.            L(i + 1) = L(i + 1) + (lS(i) / &H10)
  257.        End If
  258.  
  259.        '//FIX
  260.        L(i) = lR(i)
  261.    End If
  262. Next i
  263.  
  264. 'XX - XX - L2, L1 - L4, L3 - L6, L5 - L8, L7
  265. 'CalcularBytes = "0F - " & _
  266.                 "85 - " & _
  267.                 Hex(L(2)) & Hex(L(1)) & " - " & _
  268.                 Hex(L(4)) & Hex(L(3)) & " - " & _
  269.                 Hex(L(6)) & Hex(L(5)) & " - " & _
  270.                 Hex(L(8)) & Hex(L(7))
  271.  
  272. '0F 85 FC 04 00 00
  273. '0x0 4  F C  85 0F
  274. '  4,3  2,1  85 0F
  275. CalcularBytes2 = Hex(L(4)) & Hex(L(3)) & Hex(L(2)) & Hex(L(1)) & "850F"
  276. End Function
  277.  
  278. Public Function Encrypt(ByVal vVal As Variant, ByVal mlvl As Byte, ByVal Pass As Variant, ByVal EncKa As Byte) As Variant
  279. Dim vValCpy As Variant
  280. Dim FVal As Variant
  281. Dim i As Byte, X As Byte
  282.  
  283. Dim TheAsc As Long
  284. Dim TheAscX As Long
  285.  
  286. Dim PassEnc As Long
  287. Dim TheXor As Long
  288.  
  289. FVal = vVal
  290. PassEnc = PassEncrypt(Pass)
  291.  
  292. If EncKa = 1 Then
  293. '    Form1.List1.AddItem "------------"
  294. '    Form1.List1.AddItem "Val Encrypt:"
  295. '    Form1.List1.AddItem "------------"
  296. ElseIf EncKa = 2 Then
  297. '    Form1.List1.AddItem "------------"
  298. '    Form1.List1.AddItem "Pass Encrypt:"
  299. '    Form1.List1.AddItem "------------"
  300. End If
  301.  
  302. For i = 1 To mlvl
  303.    DoEvents
  304.    vValCpy = FVal
  305.    FVal = ""
  306.    For X = 1 To Len(vValCpy)
  307.        DoEvents
  308.        TheAsc = Asc(Mid(vValCpy, X, 1)) + X 'Convierto a ASCII y le sumo la posicion
  309.        TheAscX = TheAsc - 2 'Le resto 2
  310.        TheXor = TheAscX Xor PassEnc 'Hago un XOR con la Pss
  311.        FVal = FVal & Chr(TheXor) 'Lo transformo a CHAR
  312.    Next X
  313.    'Form1.List1.AddItem FVal
  314. Next i
  315. Encrypt = FVal
  316. End Function
  317.  
  318. Public Function Decrypt(ByVal vVal As Variant, ByVal mlvl As Byte, ByVal Pass As Variant, ByVal EncKa As Byte) As Variant
  319. Dim vValCpy As Variant
  320. Dim FVal As Variant
  321. Dim i As Byte, X As Byte
  322.  
  323. Dim TheAsc As Long
  324. Dim TheAscX As Long
  325.  
  326. Dim PassEnc As Long
  327. Dim TheXor As Long
  328.  
  329. FVal = vVal
  330. PassEnc = PassEncrypt(Pass)
  331.  
  332. If EncKa = 1 Then
  333. '    Form1.List1.AddItem "------------"
  334. '    Form1.List1.AddItem "Val Encrypt:"
  335. '    Form1.List1.AddItem "------------"
  336. ElseIf EncKa = 2 Then
  337. '    Form1.List1.AddItem "------------"
  338. '    Form1.List1.AddItem "Pass Encrypt:"
  339. '    Form1.List1.AddItem "------------"
  340. End If
  341.  
  342. For i = 1 To mlvl
  343.    DoEvents
  344.    vValCpy = FVal
  345.    FVal = ""
  346.    For X = 1 To Len(vValCpy)
  347.        DoEvents
  348.        'TheAsc = Asc(Mid(vValCpy, x, 1)) + x 'Convierto a ASCII y le sumo la posicion
  349.        'TheAscX = TheAsc - 2 'Le resto 2
  350.        'TheXor = TheAscX Xor PassEnc 'Hago un XOR con la Pss
  351.        'FVal = FVal & Chr(TheXor) 'Lo transformo a CHAR
  352.  
  353.        TheAsc = Asc(Mid(vValCpy, X, 1))
  354.        TheXor = TheAsc Xor PassEnc
  355.        TheAscX = TheXor + 2
  356.        TheAscX = TheAscX - X
  357.        FVal = FVal & Chr(TheAscX)
  358.    Next X
  359.    'Form1.List1.AddItem FVal
  360. Next i
  361. Decrypt = FVal
  362. End Function
  363.  
  364. Public Function PassEncrypt(ByVal Pass As Variant)
  365. Dim vVal As Integer
  366. Dim i As Byte
  367.  
  368. For i = 1 To Len(Pass)
  369.    DoEvents
  370.    vVal = vVal + (Asc(Mid(Pass, i, 1)) \ 2)
  371. Next i
  372. vVal = vVal \ 3
  373. PassEncrypt = vVal
  374. End Function
  375.  
  376. Function FileExist(ByVal File As String, ByVal FileType As VbFileAttribute) As Boolean
  377.    FileExist = (Dir$(File, FileType) <> "")
  378. End Function

USO:
Código
  1. MiseryCalc2(ADDRESS, OFFSET1, OFFSET2, OFFSET3, ...)
  2.  
  3. Ej:
  4. MiseryCalc2(BaseAddress + &HF3034, &H44, &H28)
  5.  
« Última modificación: 7 Octubre 2013, 06:09 am por Miseryk » En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
jonnyHS

Desconectado Desconectado

Mensajes: 5


Ver Perfil
Re: VB.NET PointerWrite pointers LVL4
« Respuesta #4 en: 7 Octubre 2013, 19:44 pm »

Es muy raro que yo comparta código de hacks/cheats, pero aquí tienes el módulo completo, son del 2010 o antes, así que no están optimizados:

Código
  1. Option Explicit
  2.  
  3. Private Type tOffset
  4.    HexValue As Variant
  5.    DecimValue As Long
  6.    HexAddress As Variant
  7.    DecimAddress As Long
  8. End Type
  9.  
  10. Private NumOffsets As Long
  11. Private Offsets() As tOffset
  12. Private ActualOffsetVal As Variant
  13.  
  14.  
  15. Private FAddressHex As Variant
  16. Private FAddressDecim As Long
  17. Private FValueHex As Variant
  18. Private FValueDecim As Long
  19.  
  20. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  21. Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal Hwnd As Long, lpdwProcessId As Long) As Long
  22. Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  23.  
  24. Public Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  25. Public Declare Function WriteProcessMem Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  26.  
  27. Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
  28. Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
  29. Private Declare Function Hotkey Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
  30.  
  31.  
  32. Public L(1 To 8) As Long, lR(1 To 8) As Long, lS(1 To 8) As Long
  33. Public v(1 To 8) As Variant
  34. Public OffSet(1 To 8) As Variant
  35.  
  36. Public Pass As String
  37.  
  38. Public Function MiseryCalc(ByVal Address As Long, ParamArray TheOffsets() As Variant) As Variant
  39. 'On Error GoTo Err:
  40.  
  41. Dim i As Byte
  42. Dim handle As Long
  43. Dim ProcessID As Long
  44. Dim ProcessHandle As Long
  45. Dim PointerValue As Long
  46. Dim AddressDec As Long
  47. Dim AddressHex As String
  48.  
  49. 'MsgBox UBound(TheOffsets) '0, 1
  50. NumOffsets = UBound(TheOffsets) + 1
  51. 'MsgBox NumOffsets
  52. 'Exit Sub
  53.  
  54. ReDim Offsets(NumOffsets)
  55.  
  56. For i = 1 To NumOffsets
  57.    ActualOffsetVal = TheOffsets(i - 1)
  58.    'MsgBox ActualOffsetVal
  59.  
  60.    Offsets(i).HexValue = "&H" & ActualOffsetVal
  61.    Offsets(i).DecimValue = "&H" & ActualOffsetVal
  62. Next i
  63.  
  64. 'handle = FindWindow(vbNullString, "Argentum Online")
  65. 'GetWindowThreadProcessId handle, ProcessID
  66. 'ProcessHandle = OpenProcess(&H1F0FFF, True, ProcessID)
  67. ProcessHandle = myHandle
  68.  
  69. For i = 1 To NumOffsets
  70.    If i = 1 Then
  71.        ReadProcessMem ProcessHandle, CLng(Address), PointerValue, 4&, 0
  72.    Else
  73.        ReadProcessMem ProcessHandle, Offsets(i - 1).DecimAddress, PointerValue, 4&, 0
  74.    End If
  75.    AddressDec = PointerValue + Offsets(i).DecimValue
  76.    Offsets(i).DecimAddress = AddressDec
  77.    Offsets(i).HexAddress = Hex(AddressDec)
  78. Next i
  79.  
  80. FAddressDecim = Offsets(NumOffsets).DecimAddress
  81. ReadProcessMem ProcessHandle, FAddressDecim, FValueDecim, 4&, 0
  82.  
  83. FValueDecim = FValueDecim + 0
  84.  
  85. FAddressHex = Hex(AddressDec)
  86. FValueHex = Hex(FValueDecim)
  87.  
  88. MiseryCalc = FAddressDecim
  89.  
  90. 'CloseHandle ProcessHandle
  91.  
  92. 'Exit Function
  93. 'Err:
  94. '    Exit Function
  95. End Function
  96.  
  97. Public Function MiseryCalc2(ByVal Address As Long, ParamArray TheOffsets() As Variant) As Variant
  98. 'On Error GoTo Err:
  99.  
  100. Dim i As Byte
  101. Dim handle As Long
  102. Dim ProcessID As Long
  103. Dim ProcessHandle As Long
  104. Dim PointerValue As Long
  105. Dim AddressDec As Long
  106. Dim AddressHex As String
  107.  
  108. 'MsgBox UBound(TheOffsets) '0, 1
  109. NumOffsets = UBound(TheOffsets) + 1
  110. 'MsgBox NumOffsets
  111. 'Exit Sub
  112.  
  113. ReDim Offsets(NumOffsets)
  114.  
  115. For i = 1 To NumOffsets
  116.    ActualOffsetVal = TheOffsets(i - 1)
  117.    'MsgBox ActualOffsetVal
  118.  
  119.    Offsets(i).HexValue = ActualOffsetVal
  120.    Offsets(i).DecimValue = ActualOffsetVal
  121. Next i
  122.  
  123. 'handle = FindWindow(vbNullString, "Argentum Online")
  124. 'GetWindowThreadProcessId handle, ProcessID
  125. 'ProcessHandle = OpenProcess(&H1F0FFF, True, ProcessID)
  126. ProcessHandle = myHandle
  127.  
  128. For i = 1 To NumOffsets
  129.    If i = 1 Then
  130.        ReadProcessMem ProcessHandle, Address, PointerValue, 4&, 0
  131.    Else
  132.        ReadProcessMem ProcessHandle, Offsets(i - 1).DecimAddress, PointerValue, 4&, 0
  133.    End If
  134.    AddressDec = PointerValue + Offsets(i).DecimValue
  135.    Offsets(i).DecimAddress = AddressDec
  136.    Offsets(i).HexAddress = Hex(AddressDec)
  137. Next i
  138.  
  139. FAddressDecim = Offsets(NumOffsets).DecimAddress
  140. ReadProcessMem ProcessHandle, FAddressDecim, FValueDecim, 4&, 0
  141.  
  142. FValueDecim = FValueDecim + 0
  143.  
  144. FAddressHex = Hex(AddressDec)
  145. FValueHex = Hex(FValueDecim)
  146.  
  147. MiseryCalc2 = FAddressDecim
  148.  
  149. 'CloseHandle ProcessHandle
  150.  
  151. 'Exit Function
  152. 'Err:
  153. '    Exit Function
  154. End Function
  155.  
  156. Public Function CalcularBytes(ByVal Address As Long) As String
  157. Dim i As Byte
  158. Dim AddressHex As Variant
  159. Dim NAH As Variant
  160.  
  161. AddressHex = Hex(Address)
  162.  
  163. AddressHex = "0000000" & (AddressHex)
  164.  
  165. NAH = Right(AddressHex, 8)
  166.  
  167. 'jne 12345678
  168. 'XX -XX - L2, L1 - L4, L3 - L6, L5 - L8, L7
  169.  
  170. For i = 1 To 8
  171.    v(9 - i) = "&H" & Mid(NAH, i, 1)
  172. Next i
  173.  
  174. OffSet(1) = &H3
  175. 'OffSet(2) = &H6
  176.  
  177. 'OffSet(3) = &HA
  178. 'OffSet(4) = &H2
  179.  
  180. OffSet(5) = &H7
  181. OffSet(6) = &HB
  182.  
  183. OffSet(7) = &HF
  184. OffSet(8) = &HF
  185.  
  186. For i = 1 To 8
  187.    L(i) = L(i) + v(i) + OffSet(i)
  188.  
  189.    If L(i) > &HF Then
  190.        lR(i) = (L(i) - &H10)
  191.  
  192.  
  193.        If i <> 8 Then
  194.            lS(i) = (L(i) - lR(i))
  195.            L(i + 1) = L(i + 1) + (lS(i) / &H10)
  196.        End If
  197.  
  198.        '//FIX
  199.        L(i) = lR(i)
  200.    End If
  201. Next i
  202.  
  203. 'XX - XX - L2, L1 - L4, L3 - L6, L5 - L8, L7
  204. 'CalcularBytes = "0F - " & _
  205.                 "85 - " & _
  206.                 Hex(L(2)) & Hex(L(1)) & " - " & _
  207.                 Hex(L(4)) & Hex(L(3)) & " - " & _
  208.                 Hex(L(6)) & Hex(L(5)) & " - " & _
  209.                 Hex(L(8)) & Hex(L(7))
  210.  
  211. '0F 85 FC 04 00 00
  212. '0x0 4  F C  85 0F
  213. '  4,3  2,1  85 0F
  214. CalcularBytes = Hex(L(4)) & Hex(L(3)) & Hex(L(2)) & Hex(L(1)) & "850F"
  215. End Function
  216.  
  217. Public Function CalcularBytes2(ByVal Address As Long) As String
  218. Dim i As Byte
  219. Dim AddressHex As Variant
  220. Dim NAH As Variant
  221.  
  222. AddressHex = Hex(Address)
  223.  
  224. AddressHex = "0000000" & (AddressHex)
  225.  
  226. NAH = Right(AddressHex, 8)
  227.  
  228. 'jne 12345678
  229. 'XX -XX - L2, L1 - L4, L3 - L6, L5 - L8, L7
  230.  
  231. For i = 1 To 8
  232.    v(9 - i) = "&H" & Mid(NAH, i, 1)
  233. Next i
  234.  
  235. OffSet(1) = &H3
  236. 'OffSet(2) = &H6
  237.  
  238. 'OffSet(3) = &HA
  239. 'OffSet(4) = &H2
  240.  
  241. OffSet(5) = &H7
  242. OffSet(6) = &HB
  243.  
  244. OffSet(7) = &HF
  245. OffSet(8) = &HF
  246.  
  247. For i = 1 To 8
  248.    L(i) = L(i) + v(i) + OffSet(i)
  249.  
  250.    If L(i) > &HF Then
  251.        lR(i) = (L(i) - &H10)
  252.  
  253.  
  254.        If i <> 8 Then
  255.            lS(i) = (L(i) - lR(i))
  256.            L(i + 1) = L(i + 1) + (lS(i) / &H10)
  257.        End If
  258.  
  259.        '//FIX
  260.        L(i) = lR(i)
  261.    End If
  262. Next i
  263.  
  264. 'XX - XX - L2, L1 - L4, L3 - L6, L5 - L8, L7
  265. 'CalcularBytes = "0F - " & _
  266.                 "85 - " & _
  267.                 Hex(L(2)) & Hex(L(1)) & " - " & _
  268.                 Hex(L(4)) & Hex(L(3)) & " - " & _
  269.                 Hex(L(6)) & Hex(L(5)) & " - " & _
  270.                 Hex(L(8)) & Hex(L(7))
  271.  
  272. '0F 85 FC 04 00 00
  273. '0x0 4  F C  85 0F
  274. '  4,3  2,1  85 0F
  275. CalcularBytes2 = Hex(L(4)) & Hex(L(3)) & Hex(L(2)) & Hex(L(1)) & "850F"
  276. End Function
  277.  
  278. Public Function Encrypt(ByVal vVal As Variant, ByVal mlvl As Byte, ByVal Pass As Variant, ByVal EncKa As Byte) As Variant
  279. Dim vValCpy As Variant
  280. Dim FVal As Variant
  281. Dim i As Byte, X As Byte
  282.  
  283. Dim TheAsc As Long
  284. Dim TheAscX As Long
  285.  
  286. Dim PassEnc As Long
  287. Dim TheXor As Long
  288.  
  289. FVal = vVal
  290. PassEnc = PassEncrypt(Pass)
  291.  
  292. If EncKa = 1 Then
  293. '    Form1.List1.AddItem "------------"
  294. '    Form1.List1.AddItem "Val Encrypt:"
  295. '    Form1.List1.AddItem "------------"
  296. ElseIf EncKa = 2 Then
  297. '    Form1.List1.AddItem "------------"
  298. '    Form1.List1.AddItem "Pass Encrypt:"
  299. '    Form1.List1.AddItem "------------"
  300. End If
  301.  
  302. For i = 1 To mlvl
  303.    DoEvents
  304.    vValCpy = FVal
  305.    FVal = ""
  306.    For X = 1 To Len(vValCpy)
  307.        DoEvents
  308.        TheAsc = Asc(Mid(vValCpy, X, 1)) + X 'Convierto a ASCII y le sumo la posicion
  309.        TheAscX = TheAsc - 2 'Le resto 2
  310.        TheXor = TheAscX Xor PassEnc 'Hago un XOR con la Pss
  311.        FVal = FVal & Chr(TheXor) 'Lo transformo a CHAR
  312.    Next X
  313.    'Form1.List1.AddItem FVal
  314. Next i
  315. Encrypt = FVal
  316. End Function
  317.  
  318. Public Function Decrypt(ByVal vVal As Variant, ByVal mlvl As Byte, ByVal Pass As Variant, ByVal EncKa As Byte) As Variant
  319. Dim vValCpy As Variant
  320. Dim FVal As Variant
  321. Dim i As Byte, X As Byte
  322.  
  323. Dim TheAsc As Long
  324. Dim TheAscX As Long
  325.  
  326. Dim PassEnc As Long
  327. Dim TheXor As Long
  328.  
  329. FVal = vVal
  330. PassEnc = PassEncrypt(Pass)
  331.  
  332. If EncKa = 1 Then
  333. '    Form1.List1.AddItem "------------"
  334. '    Form1.List1.AddItem "Val Encrypt:"
  335. '    Form1.List1.AddItem "------------"
  336. ElseIf EncKa = 2 Then
  337. '    Form1.List1.AddItem "------------"
  338. '    Form1.List1.AddItem "Pass Encrypt:"
  339. '    Form1.List1.AddItem "------------"
  340. End If
  341.  
  342. For i = 1 To mlvl
  343.    DoEvents
  344.    vValCpy = FVal
  345.    FVal = ""
  346.    For X = 1 To Len(vValCpy)
  347.        DoEvents
  348.        'TheAsc = Asc(Mid(vValCpy, x, 1)) + x 'Convierto a ASCII y le sumo la posicion
  349.        'TheAscX = TheAsc - 2 'Le resto 2
  350.        'TheXor = TheAscX Xor PassEnc 'Hago un XOR con la Pss
  351.        'FVal = FVal & Chr(TheXor) 'Lo transformo a CHAR
  352.  
  353.        TheAsc = Asc(Mid(vValCpy, X, 1))
  354.        TheXor = TheAsc Xor PassEnc
  355.        TheAscX = TheXor + 2
  356.        TheAscX = TheAscX - X
  357.        FVal = FVal & Chr(TheAscX)
  358.    Next X
  359.    'Form1.List1.AddItem FVal
  360. Next i
  361. Decrypt = FVal
  362. End Function
  363.  
  364. Public Function PassEncrypt(ByVal Pass As Variant)
  365. Dim vVal As Integer
  366. Dim i As Byte
  367.  
  368. For i = 1 To Len(Pass)
  369.    DoEvents
  370.    vVal = vVal + (Asc(Mid(Pass, i, 1)) \ 2)
  371. Next i
  372. vVal = vVal \ 3
  373. PassEncrypt = vVal
  374. End Function
  375.  
  376. Function FileExist(ByVal File As String, ByVal FileType As VbFileAttribute) As Boolean
  377.    FileExist = (Dir$(File, FileType) <> "")
  378. End Function

USO:
Código
  1. MiseryCalc2(ADDRESS, OFFSET1, OFFSET2, OFFSET3, ...)
  2.  
  3. Ej:
  4. MiseryCalc2(BaseAddress + &HF3034, &H44, &H28)
  5.  

Donde coloco el proceso y el valor? ._.
Cual VS usaste? el 2008? me han salido más de 40 errores he intento repararlos y a que te refieres con ¿DoEvents?
« Última modificación: 7 Octubre 2013, 23:14 pm por jonnyHS » En línea

Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: VB.NET PointerWrite pointers LVL4
« Respuesta #5 en: 9 Octubre 2013, 21:03 pm »

Donde coloco el proceso y el valor? ._.
Cual VS usaste? el 2008? me han salido más de 40 errores he intento repararlos y a que te refieres con ¿DoEvents?

El handle del proceso lo meto acá:

Código
  1. ProcessHandle = myHandle

Donde myHandle es una variable global que guardé el handle del proceso.

Lo hice en VB6, fijate de pasarlo a VB.NET, debe ser casi lo mismo.

http://msdn.microsoft.com/es-es/library/system.windows.forms.application.doevents.aspx

Con respecto al DoEvents:

http://support.microsoft.com/kb/118468/es

La función DoEvents entrega la ejecución de la macro, para que el sistema operativo pueda procesar otros eventos. La función DoEvents pasa el control de la aplicación para el sistema operativo. Algunos casos en los que puede resultar útil DoEvents incluyen los siguientes:
Hardware de E/S
Bucles de retardo
Llamadas al sistema operativo
DDE de interbloqueos
Este artículo también analiza los problemas potenciales asociados a la función DoEvents.

PD:

También prodrías hacer ésto:

Código
  1. Public Function MiseryCalc2(ByVal PROCESSHANDLEparam As Long, ByVal Address As Long, ParamArray TheOffsets() As Variant) As Variant
  2.  
  3. ...
  4.  
  5. ProcessHandle = PROCESSHANDLEparam
  6.  
  7. ...
  8.  
« Última modificación: 9 Octubre 2013, 21:06 pm por Miseryk » En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
jonnyHS

Desconectado Desconectado

Mensajes: 5


Ver Perfil
Re: VB.NET PointerWrite pointers LVL4
« Respuesta #6 en: 9 Octubre 2013, 23:45 pm »

El handle del proceso lo meto acá:

Código
  1. ProcessHandle = myHandle

Donde myHandle es una variable global que guardé el handle del proceso.

Lo hice en VB6, fijate de pasarlo a VB.NET, debe ser casi lo mismo.

http://msdn.microsoft.com/es-es/library/system.windows.forms.application.doevents.aspx

Con respecto al DoEvents:

http://support.microsoft.com/kb/118468/es

La función DoEvents entrega la ejecución de la macro, para que el sistema operativo pueda procesar otros eventos. La función DoEvents pasa el control de la aplicación para el sistema operativo. Algunos casos en los que puede resultar útil DoEvents incluyen los siguientes:
Hardware de E/S
Bucles de retardo
Llamadas al sistema operativo
DDE de interbloqueos
Este artículo también analiza los problemas potenciales asociados a la función DoEvents.

PD:

También prodrías hacer ésto:

Código
  1. Public Function MiseryCalc2(ByVal PROCESSHANDLEparam As Long, ByVal Address As Long, ParamArray TheOffsets() As Variant) As Variant
  2.  
  3. ...
  4.  
  5. ProcessHandle = PROCESSHANDLEparam
  6.  
  7. ...
  8.  

Sabes algún conversor de VB6 a NET?
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Tutorial] Hallar Pointers & Offset con CE & MHS5
Ingeniería Inversa
[NelSito*] 3 6,886 Último mensaje 25 Octubre 2011, 04:42 am
por jackgris
Pointers & Offsets
Ingeniería Inversa
calk9 8 12,515 Último mensaje 13 Diciembre 2011, 04:40 am
por calk9
Pointers y offset de World of Warcraft « 1 2 »
Ingeniería Inversa
Sefi 16 8,471 Último mensaje 12 Abril 2012, 22:28 pm
por Sefi
frame pointers?
Programación General
aixeiger 2 2,451 Último mensaje 21 Marzo 2013, 17:55 pm
por aixeiger
Pointers & Offests MHS5
Ingeniería Inversa
calk9 6 4,071 Último mensaje 11 Noviembre 2013, 18:16 pm
por calk9
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines