#!/bin/bash
#author coffee_45
htmlfile="/var/www/html/www.html" ;
tempfile="/home/shen/temp.temp" ;
everyrow=3 ;
echo -n > $tempfile
nmap -P0 192.168.0.160| grep open > $tempfile ;
echo -n > $htmlfile ;
echo "<table>" >> $htmlfile ;
while read line;
do
echo "<tr><td><a href=http://"$line"/ target=_blank>"$line"</a></td></tr>" >> $htmlfile ;
done < $tempfile
echo "</table>" >> $htmlfile ;