From 5646e02a8a9cca0a4104974a2125a7f9fb8adb39 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Sun, 14 Jun 2009 20:18:38 +0000 Subject: [PATCH] Fix 1.9.1 compat for msfelfscan git-svn-id: file:///home/svn/framework3/trunk@6659 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/elfscan/scanner.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rex/elfscan/scanner.rb b/lib/rex/elfscan/scanner.rb index 0c71d34bff..84857ade77 100644 --- a/lib/rex/elfscan/scanner.rb +++ b/lib/rex/elfscan/scanner.rb @@ -152,8 +152,8 @@ class PopPopRetScanner < JmpRegScanner message = '' pops = elf.read(offset, 2) - reg1 = Rex::Arch::X86.reg_name32(pops[0] & 0x7) - reg2 = Rex::Arch::X86.reg_name32(pops[1] & 0x7) + reg1 = Rex::Arch::X86.reg_name32(pops[0,1].unpack('C*')[0] & 0x7) + reg2 = Rex::Arch::X86.reg_name32(pops[1,1].unpack('C*')[0] & 0x7) message = "pop #{reg1}; pop #{reg2}; "