Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: [Bug]? Script Directories 4.23RC3 on MSWin32
From: David Fifield <david () bamsoftware com>
Date: Fri, 14 Dec 2007 01:37:05 -0700

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 -sSV -p80 --script \myscripts -d
SCRIPT ENGINE: Will run C:\Program 
Files\Nmap\\myscripts\skype_v2-version.nse against

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


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

David Fifield

Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]