Skip to content

Commit 5d7d0e6

Browse files
author
Lays
committed
hide "JUMP is taken" on ret
1 parent 2a8e615 commit 5d7d0e6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

peda.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -5002,7 +5002,8 @@ def recover_plt(text,arch):
50025002
text += red(code[0]) + "\n"
50035003
for line in code[1:]:
50045004
text += " %s\n" % line.strip()
5005-
text += red("JUMP is taken".rjust(79))
5005+
if "ret" not in opcode:
5006+
text += red("JUMP is taken".rjust(79))
50065007
else :
50075008
text += format_disasm_code(peda.disassemble_around(pc, count), pc)
50085009
text += "\n" + green("jump is not taken".rjust(79))
@@ -5039,7 +5040,8 @@ def recover_plt(text,arch):
50395040
text += red(code[0]) + "\n"
50405041
for line in code[1:]:
50415042
text += " %s\n" % line.strip()
5042-
text += red("JUMP is taken".rjust(79))
5043+
if "ret" not in opcode:
5044+
text += red("JUMP is taken".rjust(79))
50435045
else: # JUMP is NOT taken
50445046
text += format_disasm_code(peda.disassemble_around(pc, count), pc)
50455047
text += "\n" + green("JUMP is NOT taken".rjust(79))

0 commit comments

Comments
 (0)