pcapdnet.py 文件源码

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

项目:hakkuframework 作者: 4shadoww 项目源码 文件源码
def in6_getifaddr():
      """
      Returns a list of 3-tuples of the form (addr, scope, iface) where
      'addr' is the address of scope 'scope' associated to the interface
      'ifcace'.

      This is the list of all addresses of all interfaces available on
      the system.
      """

      ret = []
      interfaces = get_if_list()
      for i in interfaces:
        addrs = netifaces.ifaddresses(i)
        if netifaces.AF_INET6 not in addrs:
          continue
        for a in addrs[netifaces.AF_INET6]:
          addr = a['addr'].split('%')[0]
          scope = scapy.utils6.in6_getscope(addr)
          ret.append((addr, scope, i))
      return ret
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号