文件名称:Linux-MAC20081224.rar
-
所属分类:
- 标签属性:
- 上传时间:2012-09-04
-
文件大小:13.81kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
在linux下,c语言编写,可以根据对方的IP,查看其MAC地址,也可以扫描局域网在线IP的MAC和主机名。原理:建立socket ,构造netbios-ns包,循环sendto()把数据发送给对方并recvfrom()读取返回信息。根据返回的netbios回应包,读取对方的主机名,组名和mac地址。
显示结果如下:
IP: 192.168.116.124 Host Name: BRN_8EEE6A/BRN_8EEE6A MAC: 00-80-77-8E-EE-6A
IP: 192.168.116.130 Host Name: XIAOXIAO/MSHOME MAC: 00-12-3F-D5-5E-A6
IP: 192.168.116.131 Host Name: NA MAC: NA [time out!]
一个网段扫描MAC,可以建立一个socket,连续向多个不同IP发送NBNS包,然后等待接受,根据返回包就可以扫描一个网段多个IP的MAC啦。
而windows下可以运行命令:nbtstat -A ip-address来查看
windows c 要改改头文件 ,C language, based on each other s IP, to see its MAC address, can also scann more online IP-LAN MAC and host name.
Principle: To establish a socket, constructed netbios-ns package, cycle to use sendto () function sent the data to the other side ,
and use recvfrom () to read back-information. Netbios respond in accordance with the return package, read each other s host name, group name and mac address.
显示结果如下:
IP: 192.168.116.124 Host Name: BRN_8EEE6A/BRN_8EEE6A MAC: 00-80-77-8E-EE-6A
IP: 192.168.116.130 Host Name: XIAOXIAO/MSHOME MAC: 00-12-3F-D5-5E-A6
IP: 192.168.116.131 Host Name: NA MAC: NA [time out!]
一个网段扫描MAC,可以建立一个socket,连续向多个不同IP发送NBNS包,然后等待接受,根据返回包就可以扫描一个网段多个IP的MAC啦。
而windows下可以运行命令:nbtstat -A ip-address来查看
windows c 要改改头文件 ,C language, based on each other s IP, to see its MAC address, can also scann more online IP-LAN MAC and host name.
Principle: To establish a socket, constructed netbios-ns package, cycle to use sendto () function sent the data to the other side ,
and use recvfrom () to read back-information. Netbios respond in accordance with the return package, read each other s host name, group name and mac address.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Linux-MAC20081224/data.pcap
Linux-MAC20081224/data.txt
Linux-MAC20081224/dd
Linux-MAC20081224/scan_moreip_mac.c
Linux-MAC20081224
Linux-MAC20081224/data.txt
Linux-MAC20081224/dd
Linux-MAC20081224/scan_moreip_mac.c
Linux-MAC20081224
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.