Nmap Development mailing list archives

Re: script for virtual host discovery


From: Carlos Pantelides <carlos_pantelides () yahoo com>
Date: Sun, 7 Nov 2010 20:07:39 -0800 (PST)

Hi:

I've applied all the suggestions, done some refactoring and renamed the name listing.

It seems that there is only one important issue left, the one related to prerule(). I read in 
http://nmap.org/book/nse-usage.html that "All script arguments share a global namespace, the nmap.registry.args table." 
 I assumed that I can put something in nmap.registry from prerule() and recover it later on action(). Am I wrong? Ron's 
next comment on persist suggests me that I am right.

Ron:

The 'persist' is called the 'Nmap registry'. Don't worry about it for now, though, I'm working on something similar 
(paths instead of vhosts, though), when it's done we can revisit this. 

ok, removed all related code.

Martin:

For the portrule, just use portrule = shortport.http

My idea is that as you may be searching services outside their normal ports, you can get http and https regardless 
of what you asked to nmap. If you want to restrict http-vhosts to http or https via script args, shortport can not 
deal with that, unless there is something I've missed. 

shortport.http includes http found on any port, not just standard    ports. It does imply that the service *has* been 
identified via service detection. 

Sorry for repeating myself, but the script will receive http and https targets and I want to restrict to one or another 
from the command line.

Regards

Charli


      

Attachment: http-vhosts.nse
Description:

Attachment: http-vhosts-names.lst
Description:

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

Current thread: