jablonka.czprosek.czf

netmap

Subversion Repositories:
[/] [gen_onestat_nmap] - Blame information for rev 1

 

Line No. Rev Author Line
11simandl#!/bin/sh
2 
3# (c)2003 by Jan Krupa (krupaj@mobilnews.cz)
4# http://www.mobilnews.cz/honza/
5 
6NMAP_PATH=nmap
7 
8ping_host_all="";
9 
10for LINE in `cat $1`; do
11 ping_host=`echo -n $LINE | awk -F\; '{ printf "%s", $2 }'`;
12 ping_host_all="${ping_host_all} ${ping_host}";
13done
14 
15$NMAP_PATH -vnsP $ping_host_all | awk -F\ '{ if ($1=="Host") { if (match($2, /\(/) == 0) { printf "%s;", $2; } else { printf "%s;", substr($2, 2, (length($2)-2)); } if ($6=="up.") printf "1;0;\n"; else printf "0;0;\n"; } }';

Powered by WebSVN 2.2.1