From cbc11496a515afa10d534d00a013cfa170f820d2 Mon Sep 17 00:00:00 2001 From: Allan Wirth Date: Tue, 5 Feb 2013 23:12:44 -0500 Subject: [PATCH] Small cleanup on makex64gadgets.py --- script/makex64gadgets.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/script/makex64gadgets.py b/script/makex64gadgets.py index 99ea878..dc0567f 100755 --- a/script/makex64gadgets.py +++ b/script/makex64gadgets.py @@ -29,7 +29,6 @@ def assemble(atts): temp = tempfile.NamedTemporaryFile(suffix=".o") f = "\n".join(atts) + "\n" -# f = att + "\n" s = subprocess.Popen(["as", "--64", "-o", temp.name], stdin=subprocess.PIPE) err = s.communicate(f.encode("ascii"))[1] @@ -39,10 +38,6 @@ def assemble(atts): s3 = subprocess.Popen(["objdump", "-d", temp.name, "-M", "intel"], stdout=subprocess.PIPE) dump = s3.communicate()[0].decode("ascii").split("\n")[7:] - # is there a better match to do here? -# while not b"<.text>" in dump[0]: -# dump.pop(0) -# dump.pop(0) bins = [] intels = [] for line in dump: @@ -79,6 +74,7 @@ def inst_iter(it, dontuse = (), gpz = None): gp_registers = ( "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", "%rbp", "%rsp", +# If I were to generate all of these it would be very large. # "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" )