

def get_client(self, name=None, agent=None):
    'See :func:`burpui.misc.backend.interface.BUIbackend.get_client`'
    res = []
    if (not name):
        return res
    cli = name
    filemap = self.status('c:{0}\n'.format(cli))
    for line in filemap:
        if (not re.match('^{0}\t'.format(cli), line)):
            continue
        regex = re.compile('\\s*(\\S+)\\s+\\d\\s+(\\S)\\s+(.+)')
        match = regex.search(line)
        if ((match.group(3) == '0') or (match.group(2) not in ['i', 'c', 'C'])):
            continue
        backups = match.group(3).split('\t')
        for backup in backups:
            bkp = {
                
            }
            spl = backup.split()
            bkp['number'] = spl[0]
            bkp['deletable'] = (spl[1] == '1')
            bkp['date'] = int(spl[2])
            log = self.get_backup_logs(spl[0], name)
            bkp['encrypted'] = log['encrypted']
            bkp['received'] = log['received']
            bkp['size'] = log['totsize']
            bkp['end'] = log['end']
            res.append(bkp)
    res.reverse()
    return res

dataset/ETHPy150Open ziirish/burp-ui/burpui/misc/backend/burp1.py Burp.get_client/original