Results 1 to 5 of 5

Thread: nmap Commandline Options and NSE Question

  1. #1
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default nmap Commandline Options and NSE Question

    Does anyone know if you can specify (and have nmap adhere to) --script=safe along with -A?

    "-A: Enables OS detection and Version detection, Script scanning and Traceroute"

    However -A assumes --script=default and it seems that --script=safe is a slightly larger list of NSEs.

    To put my question another way does -A override --script=?

    The closest detail I could find was:
    Usage and Examples
    Another option which affects the scripting engine is -A. The aggressive Nmap mode implies the -sC option.
    Sadly this is terribly non-specific.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  2. #2
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default Re: nmap Commandline Options and NSE Question

    You can create a directory with only the scripts you want to run. Not sure if that helps.


    --datadir
    $NMAPDIR
    ~/.nmap (not searched on Windows)
    NMAPDATADIR
    the current directory
    A scripts subdirectory is also tried in each of these.

    When a directory name is given, Nmap loads every file in the directory whose name ends with .nse. All other files are ignored and directories are not searched recursively. When a filename is given, it does not have to have the .nse extension; it will be added automatically if necessary.

    or looks like you can ONLY load scripts which are both in two catagories.
    nmap --script "default and safe"
    Loads those scripts that are in both the default and safe categories.

  3. #3
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default

    Thanks pureh@te, I like the idea of "default and safe" though I'd probably go with "default or safe". I'm still trying to figure out of -A overrides --script though (or vice versa), I don't have access to a system that pops a result on the safe category that isn't in the default category.

    So I got in-touch with someone who is heavily into NSE development and got the following reply:
    ...arguments to --script take precedence over -A. So if you do --script=safe, it'll run all the safe scripts.
    Last edited by Archangel-Amael; 04-08-2010 at 06:52 PM.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  4. #4
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default Re: nmap Commandline Options and NSE Question

    Thanks for the response thorin.

  5. #5
    Junior Member skidmarq's Avatar
    Join Date
    Jan 2010
    Posts
    88

    Default Re: nmap Commandline Options and NSE Question

    Very informative stuff, thanks guys!

Similar Threads

  1. Rather obscure question regarding boot options
    By Capnboost in forum Beginners Forum
    Replies: 3
    Last Post: 02-26-2010, 03:41 AM
  2. NMAp NSE Question
    By thorin in forum OLD Pentesting
    Replies: 2
    Last Post: 01-23-2010, 12:59 PM
  3. Most satisfying thing you've done at the commandline
    By Virchanza in forum OLD General IT Discussion
    Replies: 10
    Last Post: 10-21-2009, 03:51 AM
  4. Question abt nmap -sP -PE
    By exus69 in forum OLD Newbie Area
    Replies: 1
    Last Post: 09-02-2009, 05:11 PM
  5. Nmap -PA -PS options - strange behaviour
    By bzdziagwa in forum OLD Pentesting
    Replies: 16
    Last Post: 07-21-2007, 05:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •