用nmap扫描端口并写到一个静态网页脚本(转贴)

[入库:2005年9月19日] [更新:2007年3月24日]

本文简介:

 

#!/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 ;

本文关键:用nmap扫描端口并写到一个静态网页脚本(转贴)
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top