'Display printable strings in memory
Usage:
MYNAME start end [minlen]
MYNAME mapname [minlen]
MYNAME (display all printable strings in binary - slow)'

def strings(self, *arg):

    (start, end, minlen) = normalize_argv(arg, 3)
    mapname = None
    if (start is None):
        mapname = 'binary'
    elif ((to_int(start) is None) or (end < start)):
        (mapname, minlen) = normalize_argv(arg, 2)
    if (minlen is None):
        minlen = 1
    if mapname:
        maps = peda.get_vmmap(mapname)
    else:
        maps = [(start, end, None, None)]
    if (not maps):
        warning_msg(('failed    to    get    memory    map    for    %s' % mapname))
        return
    text = ''
    regex_pattern = ('[%s]{%d,}' % (re.escape(string.printable), minlen))
    p = re.compile(regex_pattern.encode('utf-8'))
    for (start, end, _, _) in maps:
        mem = peda.dumpmem(start, end)
        if (not mem):
            continue
        found = p.finditer(mem)
        if (not found):
            continue
        for m in found:
            text += ('0x%x:    %s\n' % ((start + m.start()), string_repr(mem[m.start():m.end()].strip(), show_quotes=False)))
    pager(text)
    return
