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

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Mensajes
Páginas: 1 ... 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [18] 19
171  Programación / .NET (C#, VB.NET, ASP) / Re: Ayuda - guardar historial de lo que hace un usuario [C#] en: 1 Septiembre 2010, 18:29 pm
Y si pones que si uno este ya conectado el otro no pueda conectarse ?

O tu dices sobre usuarios diferentes ?
172  Programación / Bases de Datos / Re: PROBLEMAS PARA CREAR UNA BD en: 23 Julio 2010, 05:18 am
Si es por MSSQL que supongo que asi es puedes abrir con el explorador del mismo y dale click derecho a la tabla seleccion

Incluir Tabla Como -> Create To -> Nueva Ventana del editor de consultas

Y ahi te dara el codigo de como crear la tabla con las cosas que ya tengas hechas en ella =P
173  Programación / .NET (C#, VB.NET, ASP) / Re: como proteger mi programa en vb 2008 en: 21 Julio 2010, 08:15 am
yo uso .NET Reactor, lo puedes encontrar en google con su crack jeje, nose si se tenga permitido colocarlo aqui so si deceas te lo envio por MP ^^
174  Programación / .NET (C#, VB.NET, ASP) / Re: como puedo ponerle licencia o contraseña a mi programa en vb 2008 en: 21 Julio 2010, 08:14 am
Si asi como dijo D4N93R seria la mejor forma al final juntas todo en una cadena y lo conviertes en md5, bueno por lo menos yo asi lo tengo jeje ^^
175  Programación / .NET (C#, VB.NET, ASP) / Re: [Ayuda] ReadProcessMemory Address Dinamico en: 14 Junio 2010, 05:56 am
Al final lo logre jeje gracias a otro codigo bueno
Aqui dejo el codigo con el que lo solucione y con comentarios para que se entienda mejor (Puse los comentarios a como yo entendi xD)

Código:
 'API ReadProcessMemory
   <DllImport("kernel32.dll", SetLastError:=True)> _
     Private Shared Function ReadProcessMemory( _
       ByVal hProcess As IntPtr, _
       ByVal lpBaseAddress As IntPtr, _
       <Out()> ByVal lpBuffer() As Byte, _
       ByVal dwSize As Integer, _
       ByRef lpNumberOfBytesRead As Integer) As Boolean
    End Function

    Private Function FindAddress(ByVal pHandle As IntPtr, ByVal BaseAddress As IntPtr, ByVal StaticPointer As IntPtr, ByVal Offsets() As IntPtr) As IntPtr
        ' Crearemos un buffer de 4 bytes para sistema de32-bit o 8 bytes sobre un sistema de 64-bit .
        Dim tmp(IntPtr.Size - 1) As Byte
        Dim Address As IntPtr = BaseAddress
        ' Checaremos para 32-bit vs 64-bit.
        If IntPtr.Size = 4 Then
            Address = New IntPtr(Address.ToInt32 + StaticPointer.ToInt32)
        Else
            Address = New IntPtr(Address.ToInt64 + StaticPointer.ToInt64)
        End If
        ' Loop de cada Offset hasta encontrar el Address
        For i As Integer = 0 To Offsets.Length - 1
            ReadProcessMemory(pHandle, Address, tmp, IntPtr.Size, 0)
            If IntPtr.Size = 4 Then
                Address = BitConverter.ToInt32(tmp, 0) + Offsets(i).ToInt32()
            Else
                Address = BitConverter.ToInt64(tmp, 0) + Offsets(i).ToInt64()
            End If
        Next
        Return Address
    End Function

    Public Function Obtener_Address()
        Dim p As Process() = Process.GetProcessesByName("Gunz")

        ' Obtendremos el Handle y el BaseAddress de nuestro proceso
        Dim pID As IntPtr = p(0).Handle
        Dim base As IntPtr = p(0).MainModule.BaseAddress
        ' Colocamos Nuestro Pointer Estatico
        Dim sptr As IntPtr = &H26C7C8
        ' Y aqui nuestro Offset segun los necesarios
        Dim offsets() As IntPtr = {&H0, &H1F8, &H8, &H84, &H0}
        Dim addr As IntPtr = FindAddress(pID, base, sptr, offsets)
        Dim f As String
        f = addr.ToString
        Return f
    End Function

Bueno ahi con ello obtendremos ya nuestro Address ^^
Y si no saben como obtener su Pointer o que Offsets colocar Aqui les dejo un Tutorial de como obtener el Pointer y sus Offset ^^

Post Original:
Código:
This is a simple bit of code to make looking up addresses from pointers really easy.

First you'll need to add the API reference for ReadProcessMemory for this to work. Here it is:

VB.NET
[code]    <DllImport("kernel32.dll", SetLastError:=True)> _
     Public Shared Function ReadProcessMemory( _
       ByVal hProcess As IntPtr, _
       ByVal lpBaseAddress As IntPtr, _
       <Out()> ByVal lpBuffer() As Byte, _
       ByVal dwSize As Integer, _
       ByRef lpNumberOfBytesRead As Integer) As Boolean
    End Function


C#
Código:
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out()] byte[] lpBuffer, int dwSize, ref int lpNumberOfBytesRead);


And this is the code I wrote to look up an address from a pointer and a list of offsets:

VB.NET
Código:
    Private Function FindAddress(ByVal pHandle As IntPtr, ByVal BaseAddress As IntPtr, ByVal StaticPointer As IntPtr, ByVal Offsets() As IntPtr) As IntPtr
        ' Create a buffer that is 4 bytes on a 32-bit system or 8 bytes on a 64-bit system.
        Dim tmp(IntPtr.Size - 1) As Byte
        Dim Address As IntPtr = BaseAddress
        ' We must check for 32-bit vs 64-bit.
        If IntPtr.Size = 4 Then
            Address = New IntPtr(Address.ToInt32 + StaticPointer.ToInt32)
        Else
            Address = New IntPtr(Address.ToInt64 + StaticPointer.ToInt64)
        End If
        ' Loop through each offset to find the address
        For i As Integer = 0 To Offsets.Length - 1
            ReadProcessMemory(pHandle, Address, tmp, IntPtr.Size, 0)
            If IntPtr.Size = 4 Then
                Address = BitConverter.ToInt32(tmp, 0) + Offsets(i).ToInt32()
            Else
                Address = BitConverter.ToInt64(tmp, 0) + Offsets(i).ToInt64()
            End If
        Next
        Return Address
    End Function


C#
Código:
private IntPtr FindAddress(IntPtr pHandle, IntPtr BaseAddress, IntPtr StaticPointer, IntPtr[] Offsets)
{
    // Create a buffer that is 4 bytes on a 32-bit system or 8 bytes on a 64-bit system.
    byte[] tmp = new byte[IntPtr.Size];
    IntPtr Address = BaseAddress;
    // We must check for 32-bit vs 64-bit.
    if (IntPtr.Size == 4) {
        Address = new IntPtr(Address.ToInt32 + StaticPointer.ToInt32);
    }
    else {
        Address = new IntPtr(Address.ToInt64 + StaticPointer.ToInt64);
    }
    // Loop through each offset to find the address
    for (int i = 0; i < Offsets.Length; i++) {
        ReadProcessMemory(pHandle, Address, tmp, IntPtr.Size, 0);
        if (IntPtr.Size == 4) {
            Address = BitConverter.ToInt32(tmp, 0) + Offsets(i).ToInt32();
        }
        else {
            Address = BitConverter.ToInt64(tmp, 0) + Offsets(i).ToInt64();
        }
    }
    return Address;
}




Here's how you use it:
1) Get a hande to the process. I personally use the Process class to find the process I need (Process.GetProcessesByName) and then read from the Handle property.
2) Get the base address of the process, which is usually 0x400000 (&H400000 in VB.NET). You can use Process.MainModule.BaseAddress property to get the address if you want to.
3) Create an array of offsets for each pointer. If CE's pointer scan returns 0x0062B688 + 0xC, 0x38, create an array whose values are 0xC and 0x38. The StaticPointer parameter in this case would be 0x0062B688.

Here's an example:

VB.NET
Código:
' I'm assuming p is a Process object that represents the game process.
Dim pID As IntPtr = p.Handle
Dim base As IntPtr = p.MainModule.BaseAddress
' Our static pointer...
Dim sptr as IntPtr = &H62B688
' And our offsets...
Dim offsets() As IntPtr = {&HC, &H38}
Dim addr As IntPtr = FindAddress(pID, base, sptr, offsets)


C#
Código:
// I'm assuming p is a Process object that represents the game process.
IntPtr pID = p.Handle;
IntPtr @base = p.MainModule.BaseAddress;
// Our static pointer...
IntPtr sptr = 0x62b688;
// And our offsets...
IntPtr[] offsets = { 0xc, 0x38 };
IntPtr addr = FindAddress(pID, @base, sptr, offsets);


And that's it. This method has saved me loads of time when creating trainers. [/code]
Creditos: Burningmace

Obtieniendo Pointer y Offsets:
Cita de: CodeHPro;1976357
there is an easier way of find pointers but this is another way im doing this cause the game im using doesn't allow you to attach a debugger or it will crash! ok here we go first open up CE
once ce is opened click the little Computer icon

once you click it you will get a list of process id's scroll down untill you see yours sense im doing halo 2 mine will look like this

now click Open once you have your process selected then find your address's for health amo or whatever your looking for i am not showing how to find address's in this tutorial now once you find that addy  double click it so it adds it to your bottom column like this

now right click it and choose pointer scan for this address

once you click it make sure the form fields look like mine

now click OK then it will pop up with a form that will ask you for a folder where it will save your files it's good to make new folder name it whatever you want then locate the folder then make a name then click save now CE will now search for pointers this can take awhile depending on how fast your pc is once it is done you will get a window that looks like this

as you can see there are alot! of pointers that we need to get out of the way to find are real pointer you need the address to change again so restart your game or kill your self whatever resets the addy now look for the address again once you find it it should look something like

now go back to your pointerscan window and click [pointer scanner]

once you clikc it you will get a window put the addy from ce into it exactly the same like this

click OK and save the scan same as the first one but put scan 1 at the end
once you do you should get alot less pointers if you dont keep resting the addy and searching untill you get down to a couple pointers like me i have 1 left that means it is it and i found the correct pointer

PS: this isn't really the pointer for my addy if it was it would show 2 as the value i just put it there to speed up my tut

now double click it it will add it to ce once you do save it and that pointer will always point to that address and it will never change

have any questions on cheatengine or programming hacks in vb.net add me on MSN or Xfire
msn=ipivb@live.com
Xfire=codehpro

[SIZE="4"][FONT="Book Antiqua"]If this TUT helped you please press the thanks button -->>[/FONT][/SIZE]

Creditos: CodeHPro

Bueno aun asi Gracias ^^
176  Programación / .NET (C#, VB.NET, ASP) / Re: Guardar Imagen en base de datos. (c#) en: 13 Junio 2010, 20:33 pm
Pues yo lo tengo hecho tmb en un programa que hice anteriormente y lo hice con este tutorial

http://www.elguille.info/NET/ADONET/SQL2005Express/imagenes_base_SQLServer.htm

Tambien anteriormente cuando no sabia hacerlo, lo que hacia esque guardaba la imagen a un host o la enviava ahi o a una web local mia, y ya en la DB colocaba el link de la imagen.
177  Programación / .NET (C#, VB.NET, ASP) / Re: Lentitud con base de datos access en: 13 Junio 2010, 20:28 pm
Yo prefiero el DataAdapter ^^

Aunque si como dice D4N93R para qe meter tantos mejor solo que ponga un TOP 40 o 50, y aparte pones un boton de busqueda(Filtro) asi le sera mas facil.

Yo por ejemplo lo uso pero no con Acess, sino con MSSQL con una Base de Datos que est en un Host, y me va bien no es lento ni nada ademas de que son mas de 10 DataGrids los que uso en el programa y no me va nada lento ademas de un Timer para que los DataGrids se actualicen cada cierto tiempo por si hay cambios en la DB o Tablas correspondientes =P

Y como dijo tambien nadie va a ir buscando uno por uno xD, mejor es colocar un filtro ahi ^^

y ademas un diseño ahi de las celdas

Código:
DataGridview1.RowsDefaultCellStyle.BackColor = Color.White  
  
DataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.LightGray 

Talves ya lo tengas pero sino pues puedes hacerlo asi le da una mejor visualizacion ^^
178  Programación / .NET (C#, VB.NET, ASP) / [Ayuda] ReadProcessMemory Address Dinamico en: 13 Junio 2010, 03:58 am
Bueno ahora estoy haciendo una aplicacion que a la ves trabaje como ayuda a otro programa(Juego)

Ahora les explico un ejemplo de lo que hace:
Dentro del juego estoy y si deceo hay un campo de texto, mientras mi programa esta corriendo y leyendo lo que escriba ahi y segun lo que escrib ejecutara una serie de comandos para el juego (No no es Trainer) de ayuda o de informacion.

Bueno ahi ya es todo, pero hay algo malo que el Address donde leo es Dinamico por lo tanto cada que lo abro y ejecuto mi programa debo rellenar un campo de texto donde coloco el address ese nuevo address lo obtengo mediante el Cheat Engine, pero ahora deceo saber cual es la forma de poder abrir mi programa y automaticamente detecte esa linea empece a leer por google pero no e encontrado nada que me ayude a solucionarlo si e visto ejemplos pero solo para uso de ReadProcessMemory y nada mas, y cuando encuentro sobre e tema de cuando es dinamia el address no entiendo muy bien como es ademas de que no encontre ninguno en VB.NET, Segun usando el Puntero + los Offset obtendria el resultado pero no consigo entender muy bien como es, y cuando lo hago al final no me da el address verdadero =/

Bueno creo explicarme mas o menos si alguien pudiese ayudarme se lo agradeceria mucho ^^

Aqui les dejo una imagen de los punteros para llegar a mi Address(El Puntero que muestro nunca cambia)


En el primer Address of Pointer ya sume el BaseAddres con el Pointer ^^, el Address al que necesito llegar es el 043A4FD8

O si conocen alguna otra manera de obtener un address Dinamico diganmela porfavor ^^


Porfavor quien podria explicarmelo o darme una mejor idea porque llevo ya 3 dias en eso solo es y no lo entiendo muy bien aun jeje :$

Desde ya Gracias, por tomarte el tiempo de leerlo jeje ^^

P.D. Si se que aqui se trato una ves sobre ese tema pero fue en C++, ademas de que alfinal no mostro bien si lo soluciono o no y no respondia ahi porque fue hace 3 meses mas o menos.
179  Programación / .NET (C#, VB.NET, ASP) / Re: Consulta, modificacion, Eliminacion, Adicion(Codigos) en: 28 Mayo 2010, 03:35 am
Bueno pues te ire diciendo que necesitaras leer como utilizar estas consultas o querys

Consultar:
SELECT * FROM TABLA WHERE Codigo = CodigoCliente

Actualizar:
UPDATE TABLA SET Nombre=Nombre, DUI=DUI WHERE Codigo = CodigoCliente

Adicionar
INSERT INTO TABLA (Codigo,NOMBRE,DUI,SALDO) VALUES (CodigoCliente,Nombre,DUI,SALDO)

Eliminar
Delete From TABLA Where Coodigo = CodigoCliente

Bueno ahi ya te muestro lo que usaras, ya solo te faltaria hacer la conexion y usando un datagrid o listbox con eso podrias guardar ahi los datos y ya luego pasarlo a los textbox de ahi
180  Programación / .NET (C#, VB.NET, ASP) / Re: como mostrar la IP de mi PC en: 11 Abril 2010, 22:16 pm
Bueno aqui les dejo un codigo de como obtener la IP Publica ya que mayormente encontramos vario sobre esto pero frecuentemente siempre nos dan la privada jeje la cual no nos sirve de mucho pero bueno

Aqui les dejo el code
Imports System.Net
Código:
    Private Function GETIP()
        Dim req As HttpWebRequest = WebRequest.Create("http://whatismyip.com/automation/n09230945.asp")
        Dim res As HttpWebResponse = req.GetResponse()
        Dim Stream As Stream = res.GetResponseStream()
        Dim sr As StreamReader = New StreamReader(Stream)
        Return (sr.ReadToEnd())
    End Function

Ahi a como veran obtengo la IP usando la web de "http://whatismyip.com" ^^
y ya con ello desde un button podemos llamarla ya sea usando
MsgBox
Código:
MsgBox(GetIP())
o colocandolo en un TextBox
Código:
TextBox1.Text = GetIP()

Bueno esto ya seria para sus projectos ^^
Espero y les sirva
Páginas: 1 ... 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [18] 19
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines