On Sun, Dec 09, 2007 at 03:31:19PM +0000, jah wrote:
> David Fifield wrote:
> > I committed a fix for this.
> >
> > ...
> >
> > I also tested on Windows.
> >
> > David Fifield
>
> Great stuff, it seems well fixed!
> There is a slight difference between your examples above and in windows
> when a leading slash is used for a relative path:
>
> nmap 192.168.1.1 -sSV -p80 --script \myscripts -d
> SCRIPT ENGINE: Will run C:\Program
> Files\Nmap\\myscripts\skype_v2-version.nse against 192.168.1.1:80
>
> This, at both the command prompt and in zenmap.
> Difficult to know whether this should happen or not given cmd.exe behaviour:
>
> C:\nmap-4.49RC6>cd \myscripts
> The system cannot find the path specified.
>
> C:\nmap-4.49RC6>cd /myscripts
>
> C:\nmap-4.49RC6\myscripts>
Weird. I did not know about the forward slash relative path thing. I
don't want to change how a leading forward slash is handled because that
will mess things up on Cygwin.
Supporting a leading backslash as an absolute indicator on Windows seems
reasonable. If I copy the scripts directory to C:\scripts and modify the
code to treat such paths as absolute, then
nmap -d2 --script \scripts target
works (using scripts in C:\scripts) in cmd.exe.
I committed a patch that makes leading-backslash paths absolute on
Windows.
David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
Received on Dec 14 2007