

def get_all_clients(self, agent=None):
    'See :func:`burpui.misc.backend.interface.BUIbackend.get_all_clients`'
    res = []
    filemap = self.status()
    for line in filemap:
        regex = re.compile('\\s*(\\S+)\\s+\\d\\s+(\\S)\\s+(.+)')
        match = regex.search(line)
        cli = {
            
        }
        cli['name'] = match.group(1)
        cli['state'] = self.states[match.group(2)]
        infos = match.group(3)
        if (cli['state'] in ['running']):
            regex = re.compile('\\s*(\\S+)')
            reg = regex.search(infos)
            phase = reg.group(0)
            if (phase and (phase in self.states)):
                cli['phase'] = self.states[phase]
            else:
                cli['phase'] = 'unknown'
            cli['last'] = 'now'
            counters = self.get_counters(cli['name'])
            if ('percent' in counters):
                cli['percent'] = counters['percent']
            else:
                cli['percent'] = 0
        elif (infos == '0'):
            cli['last'] = 'never'
        elif re.match('^\\d+\\s\\d+\\s\\d+$', infos):
            spl = infos.split()
            cli['last'] = int(spl[2])
        else:
            spl = infos.split('\t')
            cli['last'] = int(regex[(len(spl) - 2)])
        res.append(cli)
    return res

dataset/ETHPy150Open ziirish/burp-ui/burpui/misc/backend/burp1.py Burp.get_all_clients/VarMisuse@303/428 `spl`->`regex`