Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re[2]: NSE Script: delete host from output
From: Anton Konvalyuk <w.o.l.f.paradox () mail ru>
Date: Mon, 17 Mar 2014 14:44:25 +0400

 Hello  John,

thank you for your answer. It is a nice solution. U nfortunately , I cannot use it, because of some architecture 
features.
I didn't find any function in nmap library too.


Fri, 14 Mar 2014 15:24:42 +0100 от John Bond <john.r.bond () gmail com>:
Hello Anton,

On 12 March 2014 14:06, Anton Konvalyuk < w.o.l.f.paradox () mail ru > wrote:

But it looks weird.  So, could anyone tell if there is a method to simply delete host from output?

Hi Anton,

Im not sure this is possible.  I would expect it to be exposed via the
nmap library if it where but there is nothing there, not even an
undocumented function.  However nmap might be over kill for what you
are doing.  I would just do the following

for i in $(<targets) ; do [ -z "$(dig +rec  www.google.com +tries=1
+time=1 +short @${i})" ] || echo ${i} ; done

Where report is a file with a list of targets.  If you want nmap to do
the address format expantion for you you could

for i in $(nmap -sL 192.168.0.0/24 | awk '$3=="report" {print $NF}') ;
do [ -z "$(dig +rec  www.google.com +tries=1 +time=1 +short @${i})" ]
|| echo ${i} ; done


-- 
Anton Konvalyuk
_______________________________________________
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 ]