Change the way disassemble works so it works on FreeBSD.
It did not work previously because FreeBSD does not support echo -ne git-svn-id: file:///home/svn/incoming/trunk@3285 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
e9b4f0d9f1
commit
f3252ec6f8
|
@ -63,9 +63,11 @@ class Nasm
|
|||
def self.disassemble(raw)
|
||||
check
|
||||
|
||||
# Race condition?! You bet!
|
||||
tmp = Tempfile.new('nasmout').path
|
||||
File.open(tmp, "wb") { |f| f.write(raw) }
|
||||
|
||||
p = ::IO.popen("echo -ne \"" + Rex::Text.to_hex(raw) + "\" > #{tmp} && ndisasm -u #{tmp}")
|
||||
p = ::IO.popen("ndisasm -u #{tmp}")
|
||||
o = ''
|
||||
|
||||
begin
|
||||
|
|
Loading…
Reference in New Issue