def get_if_list():
 try:
  fd = os.popen(('%s -a' % conf.prog.ifconfig))
 except OSError as msg:
  raise Scapy_Exception(('Failed to execute ifconfig: (%s)' % msg))
 interfaces = [line[:line.find(':')] for line in fd.readlines() if (': flags' in line.lower())]
 return interfaces

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