Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Nmap Development: [NSE Script] Banner Grabber

[NSE Script] Banner Grabber

From: Kris Katterjohn <katterjohn_at_gmail.com>
Date: Sun, 10 Jun 2007 14:35:30 -0500

Hey everyone!

I attached a very simple NSE script I wrote a little earlier (I just
really started trying out NSE). It justs grabs banners from open ports
(timeouts after 3 seconds).

I made a banner grabber in C a looong time ago to learn, and of course
then and now a lot of banners give away version numbers and OS info. I
know it's really simple (and some of you have probably written one
allready), but I was just thinking about if this script would be good to
ship along with Nmap, as it can be like an extremely lightweight version
and OS detector :)

Well, please let me know what you think, but be gentle :)

Thanks,
Kris Katterjohn

id = "Banner Grabber"

description = "Just grabs any banners"

author = "Kris Katterjohn <katterjohn_at_gmail.com>"

license = "See Nmap's COPYING file for licence"

categories = { "safe" }

portrule = function(host, port)
        return port.state == "open"
end

action = function(host, port)
        local socket = nmap.new_socket()

        socket:set_timeout(3000)
        socket:connect(host.ip, port.number, port.protocol)
        
        local status, result = socket:receive_lines(1)

        socket:close()

        if result ~= "TIMEOUT" then
                return result
        end
end

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Received on Jun 10 2007
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
edgeos