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
"192.123.234.22".

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
)
exit

This is the .nse script:
description=[[
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")
    file:flush()
    file:close()
end

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


  By Date           By Thread  

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