Home page logo

nmap-dev logo Nmap Development mailing list archives

Script Help!
From: Jerry Scooner <jymandigo () gmail com>
Date: Wed, 8 Jan 2014 17:39:00 -0400

First of all I would like to congratulate and also thank you for your
awesome contribution to the free world with your amazing programs and
unquestionable knowledge, your patience and time is greatly appreciated.

I have a script which doesn't seem to work with the newer version of nmap
on windows7 system.  This .nse script was not created by me I found it on a
forum and my guess is it worked at some point either on W7/Linux system.  I
run this script with a batch file which scans but there is no output .txt
file with the scanned results.  I want the script to output the results of
the scan as a list of ips with the specified port open in a .txt file e.g

This is the .bat:
@echo off
for /l %%%x in (1,1,2) do (
start "rdp" /HIGH nmap -n -Pn -p T:3389 -T5 --script rdp.nse -iR 0

This is the .nse script:
Checks if an RDP port is open.
author = "ROleg"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html";
categories = {"default", "discovery", "external", "intrusive"}
require "shortport"
portrule = shortport.portnumber(3389, "tcp", "open")
action = function(host, port)
    file = io.open ("results.txt","a+")
    file:write (host.ip.."\n")

Please help
Thank you!
Sent through the dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

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