Expand to a windows path if the exe is outside of the cygwin installation

git-svn-id: file:///home/svn/framework3/trunk@7375 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2009-11-06 16:01:24 +00:00
parent 48fb445609
commit 4fde76e8f6
1 changed files with 135 additions and 134 deletions

View File

@ -641,7 +641,7 @@ class Db
fd = Tempfile.new('dbnmap') fd = Tempfile.new('dbnmap')
# When executing native Nmap, expand the Cygwin path to a Win32 path # When executing native Nmap, expand the Cygwin path to a Win32 path
if(Rex::Compat.is_cygwin and nmap[0,1] != "/") if(Rex::Compat.is_cygwin and nmap =~ /^cygdrive/)
args.push('-oX', IO.popen("cygpath -aw #{fd.path}").read.strip) args.push('-oX', IO.popen("cygpath -aw #{fd.path}").read.strip)
else else
args.push('-oX', fd.path) args.push('-oX', fd.path)
@ -1211,3 +1211,4 @@ end
end end
end end
end end