.386
.MODEL FLAT,STDCALL
locals
jumps
UNICODE=0
include w32.inc
inet_ntoa PROCDESC WINAPI :DWORD
extrn gethostname:proc
extrn gethostbyname:proc
extrn lstrcpy:proc
.DATA
;[--------==========================================================--------];
User_Name db 24 dup (?)
User_IP db 16 dup (?)
not_online_02 db 'User Offline',0
title1 db 'USER ONLINE by Max', 0
;[--------==========================================================--------];
.CODE
main:
call GetDevices
call ExitProcess,0 ; Exit the main process
GetDevices proc near
call gethostname,offset User_Name,500 ;-- get user name
call gethostbyname,offset User_Name
cmp eax,0
je not_online
mov eax, dword ptr
mov eax, dword ptr
mov eax, dword ptr
call inet_ntoa,eax
call lstrcpy ,offset User_IP,eax
call MessageBox, 0, offset User_IP, offset title1, 0
ret
not_online:
call MessageBox, 0, offset not_online_02, offset title1, 0
ret
GetDevices endp
ends
end main
.MODEL FLAT,STDCALL
locals
jumps
UNICODE=0
include w32.inc
inet_ntoa PROCDESC WINAPI :DWORD
extrn gethostname:proc
extrn gethostbyname:proc
extrn lstrcpy:proc
.DATA
;[--------==========================================================--------];
User_Name db 24 dup (?)
User_IP db 16 dup (?)
not_online_02 db 'User Offline',0
title1 db 'USER ONLINE by Max', 0
;[--------==========================================================--------];
.CODE
main:
call GetDevices
call ExitProcess,0 ; Exit the main process
GetDevices proc near
call gethostname,offset User_Name,500 ;-- get user name
call gethostbyname,offset User_Name
cmp eax,0
je not_online
mov eax, dword ptr
mov eax, dword ptr
mov eax, dword ptr
call inet_ntoa,eax
call lstrcpy ,offset User_IP,eax
call MessageBox, 0, offset User_IP, offset title1, 0
ret
not_online:
call MessageBox, 0, offset not_online_02, offset title1, 0
ret
GetDevices endp
ends
end main
.486
.model flat,stdcall
option casemap: none
include windows.inc
include wininet.inc
include kernel32.inc
include user32.inc
includelib wininet.lib
includelib kernel32.lib
includelib user32.lib
.data?
dwMethod DWORD ?
.data
szConnected DB "You are connected to the Internet!", 0
szNotConnected DB "You are NOT connected to the Internet.", 0
.code
start:
invoke InternetGetConnectedState, ADDR dwMethod, 0
cmp eax, FALSE
push MB_OK
push NULL
je not_connected
lea ebx, szConnected
call_messagebox:
push ebx
push NULL
call MessageBox
invoke ExitProcess, 0
not_connected:
lea ebx, szNotConnected
jmp call_messagebox
END start
.model flat,stdcall
option casemap: none
include windows.inc
include wininet.inc
include kernel32.inc
include user32.inc
includelib wininet.lib
includelib kernel32.lib
includelib user32.lib
.data?
dwMethod DWORD ?
.data
szConnected DB "You are connected to the Internet!", 0
szNotConnected DB "You are NOT connected to the Internet.", 0
.code
start:
invoke InternetGetConnectedState, ADDR dwMethod, 0
cmp eax, FALSE
push MB_OK
push NULL
je not_connected
lea ebx, szConnected
call_messagebox:
push ebx
push NULL
call MessageBox
invoke ExitProcess, 0
not_connected:
lea ebx, szNotConnected
jmp call_messagebox
END start
Try my program here
here is it
hi Guys,
the program I have attached will work only for those who are using Dialup Network. Not any other.
Please send your comments
the program I have attached will work only for those who are using Dialup Network. Not any other.
Please send your comments