IP Locator hecho en MASM32. Quizas a alguien le sirva para alguna aplicacion estilo troyano
.586
.model flat, stdcall
option casemap:none
include windows.inc
include kernel32.inc
include user32.inc
include ws2_32.inc
includelib user32.lib
includelib kernel32.lib
includelib ws2_32.lib
.data
wsaData WSADATA <>;
P hostent <>;
HostName db 128 dup(0);
szCaption db "Twój adres IP",0
.data?
.code
start:
push offset wsaData
push 0101h
call WSAStartup
push 128
push offset HostName
call gethostname
push offset HostName
call gethostbyname
mov ebx, eax
assume ebx: ptr hostent
mov eax, [ebx].h_list
assume ebx: nothing
mov ebx, eax
mov eax, [ebx]
mov eax, [eax]
push eax
call inet_ntoa
push 0
push offset szCaption
push eax
push 0
call MessageBox
push 0
call ExitProcess
end start
Autor: DavidF