From 33e134418a0900835772999b04106755b9ce0037 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 17 Aug 2017 03:27:12 -0400 Subject: [PATCH] rename decode methods as well, keep this working for ruby X.X --- tools/exploit/metasm_shell.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/exploit/metasm_shell.rb b/tools/exploit/metasm_shell.rb index b39f437682..39ec5417cd 100755 --- a/tools/exploit/metasm_shell.rb +++ b/tools/exploit/metasm_shell.rb @@ -109,20 +109,20 @@ class String # decodes the current string as a Shellcode, with specified base address # returns the resulting Disassembler - def decode_blocks(base_addr=0, eip=base_addr) - sc = Metasm::Shellcode.decode(self, @@cpu) + def metasm_decode_blocks(base_addr=0, eip=base_addr) + sc = Metasm::Shellcode.metasm_decode(self, @@cpu) sc.base_addr = base_addr - sc.disassemble(eip) + sc.metasm_disassemble(eip) end # decodes the current string as a Shellcode, with specified base address # returns the asm source equivallent - def decode(base_addr=0, eip=base_addr) - decode_blocks(base_addr, eip).to_s + def metasm_decode(base_addr=0, eip=base_addr) + metasm_decode_blocks(base_addr, eip).to_s end - def disassemble(str, eip=0) - Metasm::Shellcode.disassemble(@@cpu, str, eip) + def metasm_disassemble(str, eip=0) + Metasm::Shellcode.metasm_disassemble(@@cpu, str, eip) end end @@ -149,7 +149,7 @@ def parse_gas_file(filename) begin encoded = shellcode.metasm_encode puts Rex::Text.to_ruby(encoded) - puts encoded.disassemble(shellcode.metasm_encode) + puts encoded.metasm_disassemble(shellcode.metasm_encode) rescue Metasm::Exception => e puts "Error: #{e.class} #{e.message}" end