From 8ebdbffdc6c86e9b832869046dfc6e11a8fb21be Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Sun, 13 Dec 2015 13:38:54 +0100 Subject: Update api according to Elfesteem --- example/asm/shellcode.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'example/asm/shellcode.py') diff --git a/example/asm/shellcode.py b/example/asm/shellcode.py index 253386b5..ce84238a 100644 --- a/example/asm/shellcode.py +++ b/example/asm/shellcode.py @@ -96,8 +96,13 @@ if args.encrypt: patches = new_patches print patches -for offset, raw in patches.items(): - virt[offset] = raw +if isinstance(virt, StrPatchwork): + for offset, raw in patches.items(): + virt[offset] = raw +else: + for offset, raw in patches.items(): + virt.set(offset, raw) + # Produce output open(args.output, 'wb').write(str(output)) -- cgit 1.4.1