def _get_names(config):
 all_names = set()
 non_ip_names = set()
 with open(os.path.join(config, 'vhosts')) as f:
  for line in f:
   if line[0].isspace():
    words = line.split()
    if (words[0] == 'alias'):
     all_names.add(words[1])
     non_ip_names.add(words[1])
    elif ((words[1] == '80') and (not util.IP_REGEX.match(words[3]))):
     all_names.add(words[3])
     non_ip_names.add(words[3])
   elif ('NameVirtualHost' not in line):
    words = line.split()
    if (words[0].endswith('*') or (words[0].endswith('80') and (not util.IP_REGEX.match(words[1])) and (words[1].find('.') != (-1)))):
     all_names.add(words[1])
 return (all_names, non_ip_names)

def _get_names ( config ) : all_names = set ( ) non_ip_names = set ( ) with open ( os . path . join ( config , 'vhosts' ) ) as f : for line in f : if line [ 0 ] . isspace ( ) : words = line . split ( ) if ( words [ 0 ] == 'alias' ) : all_names . add ( words [ 1 ] ) non_ip_names . add ( words [ 1 ] ) elif ( ( words [ 1 ] == '80' ) and ( not util . IP_REGEX . match ( words [ 3 ] ) ) ) : all_names . add ( words [ 3 ] ) non_ip_names . add ( words [ 3 ] ) elif ( 'NameVirtualHost' not in line ) : words = line . split ( ) if ( words [ 0 ] . endswith ( '*' ) or ( words [ 0 ] . endswith ( '80' ) and ( not util . IP_REGEX . match ( words [ 1 ] ) ) and ( words [ 1 ] . find ( '.' ) != ( - 1 ) ) ) ) : all_names . add ( words [ 1 ] ) return ( all_names , non_ip_names )
returns all and testable domain names in config .