From 6bb267f31d6cf2037d054cc19a3b2b8c7c883be4 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Fri, 8 May 2009 20:22:25 +0000 Subject: [PATCH] Add disasm method to -r git-svn-id: file:///home/svn/framework3/trunk@6532 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/pescan/scanner.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/rex/pescan/scanner.rb b/lib/rex/pescan/scanner.rb index 2fabe845cc..eaa43011a1 100644 --- a/lib/rex/pescan/scanner.rb +++ b/lib/rex/pescan/scanner.rb @@ -23,6 +23,11 @@ module Scanner vma = pe.rva_to_vma(hit[0]) msg = hit[1].is_a?(Array) ? hit[1].join(" ") : hit[1] $stdout.puts pe.ptr_s(vma) + " " + msg + if(param['disasm']) + ::Rex::Assembly::Nasm.disassemble([msg].pack("H*")).split("\n").each do |line| + $stdout.puts "\t#{line.strip}" + end + end end end end @@ -193,4 +198,4 @@ module Scanner end end -end \ No newline at end of file +end