少尉
- 注册时间
- 2014-1-14
- 金币
- 289 个
- 威望
- 1 个
- 荣誉
- 0 个
累计签到:7 天 连续签到:0 天 [LV.20]漫游旅程
|
代码:
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from scapy.all import srp,Ether,ARP,conf
- ipscan='192.168.1.1/24'
- print 'scaning…………'
- try:
- ans,unans = srp(Ether(dst="FF:FF:FF:FF:FF:FF")/ARP(pdst=ipscan),timeout=2,verbose=False)
- except Exception,e:
- print str(e)
- else:
- for snd,rcv in ans:
- list_mac=rcv.sprintf("%Ether.src% - %ARP.psrc%")
- print list_mac
复制代码 截图:

原帖地址:http://www.bluexiang.com/?post=7
|
|