(探测安全)检查网站的服务器与虚拟主机结构和服务..
时间:2010-05-14 来源:mylovelinuxto
#!/bin/bash
URL=$1
VHOST=$2
#nc $URL 80 <<EOF
#HEAD / HTTP/1.1
#HOST:$URL
#
#EOF
nc $URL 80 <<EOF
GET / HTTP/1.1
HOST:$VHOST
EOF
注视行为检查服务器版本,没注视的则为检查虚拟主机的 测试网站的服务器检查 # ./sendhttp.sh www.sina.com HTTP/1.0 301 Moved Permanently Date: Fri, 14 May 2010 03:01:09 GMT Server: Apache/2.0.63 (Unix) Location: http://www.sina.com.cn/ Cache-Control: max-age=3600 Expires: Fri, 14 May 2010 04:01:09 GMT Vary: Accept-Encoding Content-Length: 231 Content-Type: text/html; charset=iso-8859-1 Age: 3467 X-Cache: HIT from xd33-89.HP08040028.sina.com.cn Connection: close
测试虚拟主机的检查 # ./sendhttp.sh 192.168.0.253 www.sina.com HTTP/1.1 200 OK Date: Fri, 14 May 2010 04:11:47 GMT Server: Apache/2.2.3 (Red Hat) Last-Modified: Fri, 14 May 2010 04:10:28 GMT ETag: "c585d6-5-e26b500" Accept-Ranges: bytes Content-Length: 5 Connection: close Content-Type: text/html; charset=GB2312
sina
EOF
注视行为检查服务器版本,没注视的则为检查虚拟主机的 测试网站的服务器检查 # ./sendhttp.sh www.sina.com HTTP/1.0 301 Moved Permanently Date: Fri, 14 May 2010 03:01:09 GMT Server: Apache/2.0.63 (Unix) Location: http://www.sina.com.cn/ Cache-Control: max-age=3600 Expires: Fri, 14 May 2010 04:01:09 GMT Vary: Accept-Encoding Content-Length: 231 Content-Type: text/html; charset=iso-8859-1 Age: 3467 X-Cache: HIT from xd33-89.HP08040028.sina.com.cn Connection: close
测试虚拟主机的检查 # ./sendhttp.sh 192.168.0.253 www.sina.com HTTP/1.1 200 OK Date: Fri, 14 May 2010 04:11:47 GMT Server: Apache/2.2.3 (Red Hat) Last-Modified: Fri, 14 May 2010 04:10:28 GMT ETag: "c585d6-5-e26b500" Accept-Ranges: bytes Content-Length: 5 Connection: close Content-Type: text/html; charset=GB2312
sina
相关阅读 更多 +
排行榜 更多 +