From a1d3f0e4f7c477a7f9b36b450ed4b82667f75d71 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Sat, 24 Mar 2007 18:35:34 +0000 Subject: [PATCH] Yet-another-Windows-fix git-svn-id: file:///home/svn/framework3/trunk@4556 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/assembly/nasm.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/rex/assembly/nasm.rb b/lib/rex/assembly/nasm.rb index 623d9df2ba..e14294e744 100644 --- a/lib/rex/assembly/nasm.rb +++ b/lib/rex/assembly/nasm.rb @@ -72,11 +72,13 @@ class Nasm check tmp = Tempfile.new('nasmout') - tmp.write(raw) - tmp.flush() - tmp.seek(0) + tfd = File.open(tmp.path, "wb") + + tfd.write(raw) + tfd.flush() + tfd.close - p = ::IO.popen("'#{@@ndisasm_path}' -u '#{tmp.path}'") + p = ::IO.popen("\"#{@@ndisasm_path}\" -u \"#{tmp.path}\"") o = '' begin