oh, by the way does this request need the router pass to be handled??
Posted on 2004-05-24 12:56:21 by amr
linksys BEFW11S4 V4
and
NETGEAR MR814
both no-go for wanipreq


you need to pass the user/pass parameters to the request
Posted on 2004-05-24 14:07:10 by illwill
How to send the router pass??
like this
wanipreq <gateway ip> <username> <pass>

ex.: wanipreq 10.02.34.102 blah blahblah

Is this right??

Amr Turk
Posted on 2004-05-25 03:40:05 by amr
No, you should not have to send username/password to the router for UPNP to work.
As I said before UPNP is not implemented on all routers and on some routers only parts of it.
Posted on 2004-05-26 01:55:54 by Hawk
hi, I didn't send the pass and the user name as you see in the picture I have posted but it didn't work..................

Thanks

Amr
Posted on 2004-05-26 04:28:06 by amr
Thank you, all of you.
Posted on 2004-09-15 16:03:39 by Nokturnal
GetWanIP proc uses esi edi ecx
LOCAL szComputerName[128]:BYTE
LOCAL szCNameLen:DWORD
;LOCAL wsadata:WSADATA
LOCAL addWanIP:DWORD
mov szCNameLen,sizeof szComputerName
invoke GetComputerName,addr szComputerName,addr szCNameLen;????????
;invoke WSAStartup,101h,addr wsadata ;function initiates use of WS2_32.DLL by a process.
invoke gethostbyname,addr szComputerName; Windows always knows it's own IP address
mov ebx,eax
assume ebx:ptr hostent
movzx ecx,.h_len
dec ecx
mov eax,.h_list
assume ebx:nothing
mov ebx,eax ;?????????
.while ecx>0
mov eax,ebx
mov eax,
mov eax,
push ecx
invoke inet_ntoa,eax
mov addWanIP,eax
;invoke MessageBox,hMainWnd,addWanIP,addr szComputerName,MB_OK
;-------------------------------------------
mov ecx,3
lea edi,sz169
mov esi,addWanIP
repe cmpsb
or ecx,0
jnz noFind169
jmp next ;?169???
noFind169:
mov ecx,3
lea edi,sz192
mov esi,addWanIP
repe cmpsb
or ecx,0
jnz FindWanIP
jmp next
FindWanIP:
;invoke WSACleanup
;invoke MessageBox,hMainWnd,addWanIP,addr szFind,MB_OK
mov eax,addWanIP
ret
;-------------------------------------------
next:
add ebx,4
pop ecx
dec ecx
.endw
;invoke WSACleanup
xor eax,eax
ret
GetWanIP endp
Posted on 2004-12-22 03:56:42 by jndk
You chose the same method as me... my code covers all the IANA private blocks :)



;IANA private blocks
; 10.0.0.0 - 10.255.255.255 (10/8 prefix)
; 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
; 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

IsPrivateBlockIP proc dwIP:DWORD
bswap eax
.if eax>=0A000000h && dwIP<=0AFFFFFFh ;10.0.0.0 thru 10.255.255.255
return TRUE
.elseif dwIP>=0AC100000h && dwIP<=0AC1FFFFFh ;172.16.0.0 thru 172.31.255.255
return TRUE
.elseif dwIP>=0C0A80000h && dwIP<=0C0A8FFFh ;192.168.0.0 thru 192.168.255.255
return TRUE
.endif
return FALSE
IsPrivateBlockIP endp


;This procedure enumerates local IP addresses
;Each IP is checked for whether it is PrivateBlock or Public.
;Return Values:
;Success returns the first Public IP encountered
;Failure returns NULL (machine has no Public IP)

GetMyIP PROC
local szbuf[256]:BYTE
; invoke lstrcpy,addr szbuf,CTEXT("localhost")
mov szbuf(0),0
invoke gethostname, addr szbuf, sizeof szbuf ;fetch local IP address
.if eax==0
invoke gethostbyname, addr szbuf
.if eax!=0
mov eax,[eax].hostent.h_list ;fetch ptr to null-terminated list of hostaddresses
.while dword ptr[eax]!=0 ;For each hostaddress,
push eax ;(Store this during loop)
mov eax,[eax] ;Fetch pointer to the ipaddress
mov ebx,dword ptr[eax] ;and then fetch the ipaddress
push eax
invoke IsPrivateBlockIP, ebx
pop ebx
.if eax==FALSE
return dword ptr[ebx]
.endif
@@: pop eax
add eax,4
.endw
return 0
.endif
.endif
return 0
GetMyIP ENDP
Posted on 2004-12-24 06:35:11 by Homer