Fixes #3941. This should deal with the path problems I ran into on Windows. otherwise, works like a champ, so resolving.

git-svn-id: file:///home/svn/framework3/trunk@11951 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2011-03-14 03:31:40 +00:00
parent 9eb7b4f3b8
commit e073a3a01c
1 changed files with 6 additions and 1 deletions

View File

@ -93,7 +93,12 @@ end
def nmap_binary_path def nmap_binary_path
ret = Rex::FileUtils.find_full_path("nmap") || Rex::FileUtils.find_full_path("nmap.exe") ret = Rex::FileUtils.find_full_path("nmap") || Rex::FileUtils.find_full_path("nmap.exe")
if ret if ret
return ::File.expand_path(ret) fullpath = ::File.expand_path(ret)
if fullpath =~ /\s/ # Thanks, "Program Files"
return "\"#{fullpath}\""
else
return fullpath
end
else else
raise RuntimeError, "Cannot locate the nmap binary" raise RuntimeError, "Cannot locate the nmap binary"
end end