'Get common ROP gadgets of binary or library
Usage:
MYNAME [mapname]'

def ropgadget(self, *arg):

    (mapname,) = normalize_argv(arg, 1)
    result = peda.common_rop_gadget(mapname)
    if (not result):
        msg('Not    found')
    else:
        text = ''
        for (k, v) in sorted(result.items(), key=(lambda x: (len(x[0]) if (not x[0].startswith('add')) else int(x[0].split('_')[1])))):
            text += ('%s    =    0x%x\n' % (k, v))
        pager(text)
    return
