def GetEnabledInterfaces():
 interfaces = []
 show_args = ['/c', 'netsh', 'show', 'interface']
 res = client_utils_common.Execute('cmd', show_args, time_limit=(-1), bypass_whitelist=True)
 pattern = re.compile('\\s*')
 for line in res[0].split('\r\n'):
  interface_info = pattern.split(line)
  if ('Enabled' in interface_info):
   interfaces.extend(interface_info[(-1):])
 return interfaces

def GetEnabledInterfaces ( ) : interfaces = [ ] show_args = [ '/c' , 'netsh' , 'show' , 'interface' ] res = client_utils_common . Execute ( 'cmd' , show_args , time_limit = ( - 1 ) , bypass_whitelist = True ) pattern = re . compile ( '\\s*' ) for line in res [ 0 ] . split ( '\r\n' ) : interface_info = pattern . split ( line ) if ( 'Enabled' in interface_info ) : interfaces . extend ( interface_info [ ( - 1 ) : ] ) return interfaces
gives a list of enabled interfaces .