HOLA!!!
Si, podes, Archivos de hosts.
GRACIAS POR LEER!!!
Estoy buscando algo que sea por codigo en visual basic, leyendo un proceso..
pense que se podria hacer por memoria..
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Declare Function EnumWindows Lib "user32" (ByVal wndenmprc As Long, ByVal lParam As Long) As Long
Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Declare Function GetClassName Lib "user32.dll" Alias "GetClassNameA" (ByVal hWnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Const ProAcceall As Long = &H1F0FFF
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseox As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function WriteString Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, ByVal lpBaseox As Any, ByVal lpBuffer As Any, ByVal nSize As Long, ByVal lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Dim NombreVentana As String, TexoRm As String, TexoOriginal As String, Direccion As Long 'variables para utilzar con la memoria
Public Sub Started(Nom As String, t As String, d As String, p As Long) 'funcion que inicia la secuenia
NombreVentana = Nom 'nombre de la ventana a buscar o parte de ella
TexoRm = t 'texto a introducir
TexoOriginal = d 'texto original
Direccion = p 'direccionn de memoria
Call EnumWindows(AddressOf EnumCallback, 0) 'almacena los nombres obtenidos de ventanas ejecucion
End Sub
Private Function EnumCallback(ByVal A_hwnd As Long, ByVal param As Long) As Long
Dim Size_buffer As Long, buffer As String * 256
Dim str As String
Size_buffer = GetWindowText(A_hwnd, buffer, Len(buffer))
If InStr(1, Left$(buffer, Size_buffer), NombreVentana) > 0 Then
str = ReadMem(A_hwnd, Direccion, LenB(TexoOriginal), TexoRm)
Exit Function
End If
EnumCallback = 1
End Function
Private Function ReadMem(hWnd As Long, Ox As Long, Bytes As Long, Optional Rempla As String) As String
On Error Resume Next
Dim Id As Long, sHandle As Long, bytValue As Long, i As Long, Text As String
GetWindowThreadProcessId hWnd, Id
sHandle = OpenProcess(ProAcceall, False, Id)
If (sHandle = 0) Then
Exit Function
End If
If Ox = 0 Then Exit Function
For i = 1 To Bytes Step 2
ReadProcessMemory sHandle, Ox + i - 1, bytValue, 1, 0&
ReadMem = ReadMem & Chr$(bytValue)
Next
If LenB(Rempla) <> 0 Then
WriteString sHandle, Ox, StrPtr(Rempla), LenB(Rempla), 0&
End If
CloseHandle sHandle
End Function
usando esto pero no tengo la minima ideá de como sacar el offset de la ip con cheat engine, si alguien podria tirarme una mano..