(addr, max=4096)
return bytearray()
Reads a null-terminated string from memory.

    Arguments:
        addr(int): Address to read from
        max(int): Maximum string length (default 4096)

    Returns:
        An empty bytearray, or a NULL-terminated bytearray.
Reads a null-terminated string from memory.
Reads a null - terminated string from memory .
def string(addr, max=4096):
    """Reads a null-terminated string from memory.

    Arguments:
        addr(int): Address to read from
        max(int): Maximum string length (default 4096)

    Returns:
        An empty bytearray, or a NULL-terminated bytearray.
    """
    if peek(addr):
        data = bytearray(read(addr, max, partial=True))

        try:
            return data[:data.index(b'\x00')]
        except ValueError:
            pass

    return bytearray()
def string ( addr , max = 4096 ) : if peek ( addr ) : data = bytearray ( read ( addr , max , partial = True ) ) try : return data [ : data . index ( b'\x00' ) ] except ValueError : pass return bytearray ( )