toucan.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Toucan-IDS 作者: collinsullivanhub 项目源码 文件源码
def get_mac_address(ip_address):

    response, unanswered = srp(Ether(dst='ff:ff:ff:ff:ff:ff')/ARP(pdst=ip_address), \
        timeout=2, retry=2)

    for s, r in response:
        return r[Ether].src
    return None

    logging.info('Gateway Layer 2 address is: %s' % r[Ether].src)

    GATEWAY_MAC = "%s" % r[Ether].src
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号