def _fix_regs(regs, in_sizes): sizes = {} bigger = {} smaller = {} for l in regs: for r, s in zip(l, in_sizes): sizes[r] = s for n, r in enumerate(l): bigger[r] = [r_ for r_ in l if sizes[r_] > sizes[r] or r == r_] smaller[r] = [r_ for r_ in l if sizes[r_] < sizes[r]] return pwn.concat(regs), sizes, bigger, smaller
def _fix_regs(regs, in_sizes): sizes = {} bigger = {} smaller = {} for l in regs: for r, s in zip(l, in_sizes): sizes[r] = s for n, r in enumerate(l): bigger[r] = l[:n] smaller[r] = l[n + 1:] return pwn.concat(regs), sizes, bigger, smaller
def _fix_regs(regs, in_sizes): sizes = {} bigger = {} smaller = {} for l in regs: for r, s in zip(l, in_sizes): sizes[r] = s for n, r in enumerate(l): bigger[r] = l[:n] smaller[r] = l[n+1:] return pwn.concat(regs), sizes, bigger, smaller