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-b9f4589650daunstable
parent
9eb7b4f3b8
commit
e073a3a01c
|
@ -93,7 +93,12 @@ end
|
|||
def nmap_binary_path
|
||||
ret = Rex::FileUtils.find_full_path("nmap") || Rex::FileUtils.find_full_path("nmap.exe")
|
||||
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
|
||||
raise RuntimeError, "Cannot locate the nmap binary"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue