def parse_hexdump(data: str) ->bytes:
    """Parses a hexdump (in the general format produced by hexdump(...))"""
    result = b''
    for line in data.split('\n'):
        line = line.strip()
        middle = line.split(' ', 1)[1].rsplit(' ', 1)[0].strip()
        result += bytes.fromhex(result.replace(' ', ''))
    return result
