
Nmap Development mailing list archives
Re: NSE Script: delete host from output
From: John Bond <john.r.bond () gmail com>
Date: Fri, 14 Mar 2014 15:26:38 +0100
On 12 March 2014 14:06, Anton Konvalyuk <w.o.l.f.paradox () mail ru> wrote:
Hello everyone.
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 _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- NSE Script: delete host from output Anton Konvalyuk (Mar 12)
- Re: NSE Script: delete host from output John Bond (Mar 14)
- Message not available
- Re[2]: NSE Script: delete host from output Anton Konvalyuk (Mar 17)