code: def get_if_list():
      
  
      # Get ifconfig output
      try:
          fd = os.popen("%s -a" % conf.prog.ifconfig)
      except OSError as msg:
          raise Scapy_Exception("Failed to execute ifconfig: (%s)" % msg)
  
      # Get interfaces
      interfaces = [line[:line.find(':')] for line in fd.readlines()
                    if ": flags" in line.lower()]
      return interfaces
docs: Returns a list containing all network interfaces.