Board logo

标题: 【求助】显示IP地址 [打印本页]

作者: plp626     时间: 2008-6-1 23:14    标题: 【求助】显示IP地址

显示的本机IP的方法大家能想几种?
有个ipconfig/all(这个貌似对动态IP不行)

  Quote:
Windows IP Configuration


Ethernet adapter 本地连接:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 172.180.59.14
        Subnet Mask . . . . . . . . . . . : 255.255.0.0
        Default Gateway . . . . . . . . . : 172.180.0.254
ipconfig/all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : 7136DF817A6E46C
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter 本地连接:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : VIA Rhine II Fast Ethernet Adapter
        Physical Address. . . . . . . . . : 00-0B-6A-63-46-51
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 172.180.59.14
        Subnet Mask . . . . . . . . . . . : 255.255.0.0
        Default Gateway . . . . . . . . . : 172.180.0.254
        DHCP Server . . . . . . . . . . . : 172.180.0.254
        DNS Servers . . . . . . . . . . . : 61.134.1.4
                                            202.200.144.3
                                            218.30.19.40
                                            202.200.144.2
        Lease Obtained. . . . . . . . . . : 2008年6月1日 星期日 21:57:11
        Lease Expires . . . . . . . . . . : 2008年6月2日 星期一 3:57:11

上面的信息那位懂网络给个解释啊。。。

还有个nslookup

  Quote:
*** Can't find server name for address 61.134.1.4: Non-existent domain
Default Server:  ntserver1.xauat.cn
Address:  202.200.144.3

这时什么意思?

(安,把自己的IP信息全暴露在网络上,真不知有何危险?)
作者: HAT     时间: 2008-6-1 23:19

wmic NicConfig get IPAddress /value

作者: plp626     时间: 2008-6-1 23:20
我想用
netstat -a
ipconfig
写个批处理
把QQ好友的Ip地址
自动显示出来
那位感兴趣?
作者: pusofalse     时间: 2008-6-1 23:22
你给他传个文件。。。这时候是用的TCP直连~ 然后netstat -ano 就可以了啊~
作者: plp626     时间: 2008-6-1 23:26

wmic NicConfig get IPAddress  /value
就是ipconfig得到的
IP Address. . . . . . . . . . . . : 172.180.59.14
是吧?
172.180.59.14
这个在百度上查询竟然是美国的
不解?
作者: plp626     时间: 2008-6-1 23:27


  Quote:
Originally posted by pusofalse at 2008-6-1 11:22 PM:
你给他传个文件。。。这时候是用的TCP直连~ 然后netstat -ano 就可以了啊~

还用传文件吗,我们之间通话难道不开端口吗?
作者: pusofalse     时间: 2008-6-1 23:30


  Quote:
Originally posted by plp626 at 2008-6-1 11:27 PM:


还用传文件吗,我们之间通话难道不开端口吗?

当然开端口。。。但是连接到的是腾讯服务器啊~ 腾讯服务器在你聊天的时候,好比是个中转站。。只有传文件的时候才不会经过服务器 ,数据包直接连接你和你的好友~
作者: plp626     时间: 2008-6-1 23:52
好了以下是我的代码:
用法:
运行该代码后,再和你的QQ好友M通话,通话完毕后再运行该代码,所显示的IP就是M好友所在地的IP:
@echo off

netstat -a>>%tmp%\IP.tmp

::比较IPtmp里ip地址信息差异
.....
....findstr .....
....
echo 对方IP地址为%?%
我不怎么会具体细节,那位能帮个忙?
作者: joyn     时间: 2008-6-2 00:58
systeminfo


netsh interface ip dump


都可以

[ Last edited by joyn on 2008-6-2 at 01:02 AM ]