Python获取局域网IP和它所对应的MAC地址,python局域网ipmac,<Python获取局域网
Python获取局域网IP和它所对应的MAC地址,python局域网ipmac,<Python获取局域网IP和它所对应的MAC地址>1.[文件] arp_mac.py~322B
#!/usr/bin/env python2.7# -*- coding: utf-8 -*- from scapy.all import srp, Ether, ARP, conflan = '10.10.10.0/24'ans, unans = srp(Ether(dst="FF:FF:FF:FF:FF:FF")/ARP(pdst=lan), timeout=2)for snd, rcv in ans:cur_mac = rcv.sprintf("%Ether.src%")cur_ip = rcv.sprintf("%ARP.psrc%")print cur_mac + ' - ' +cur_ip
编橙之家文章,
1.[文件] arp_mac.py~322B
#!/usr/bin/env python2.7# -*- coding: utf-8 -*- from scapy.all import srp, Ether, ARP, conflan = '10.10.10.0/24'ans, unans = srp(Ether(dst="FF:FF:FF:FF:FF:FF")/ARP(pdst=lan), timeout=2)for snd, rcv in ans:cur_mac = rcv.sprintf("%Ether.src%")cur_ip = rcv.sprintf("%ARP.psrc%")print cur_mac + ' - ' +cur_ip
编橙之家文章,
相关内容
- Tkinter 实现带界面的client与server端程序,tkinterclient,Py
- 利用ip反查指定域名,利用ip指定域名,利用ip反查指定域
- python石头, 剪刀, 布源码,python源码,python写的石头,剪
- python smtplib实现的邮件功能,pythonsmtplib,基于smtplib实现
- 随机双色球中奖号码python代码,中奖号码python,爬前10
- python同步重庆时时彩的数据到本地,,依赖mysql,requ
- Python自动识别现接serial端口名称,pythonserial,Python自动识
- python 图灵机器人测试,python机器人测试,python 图灵机器
- Python实现论坛自动签到,python论坛签到,参考了各位大神
- python class实现模拟购物车代码,python购物车,<python
评论关闭