新聞中心
獲取網(wǎng)站W(wǎng)eb服務(wù)器類型的辦法如下:

創(chuàng)新互聯(lián)建站是一家專注于成都網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)與策劃設(shè)計(jì),東烏珠穆沁網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)建站做網(wǎng)站,專注于網(wǎng)站建設(shè)10余年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:東烏珠穆沁等地區(qū)。東烏珠穆沁做網(wǎng)站價(jià)格咨詢:028-86922220
有些同學(xué)老問(wèn)怎么判斷Web服務(wù)器,問(wèn)這個(gè)掃描器那個(gè)掃描器頓時(shí)月經(jīng)來(lái)潮。如nmap nc nikto等好多可以的….要那么多掃描器干嘛 NMAP一個(gè)就夠了!方法N多,舉幾個(gè)例子吧!
- nmap
- pentest@yinyin:~$ nmap -sV -p 80 www.xxoo.com
- Starting Nmap 5.00 ( http://nmap.org ) at 2010-05-24 19:49 CST
- Interesting ports on 203.xxx.xxx.1×1:
- PORT STATE SERVICE VERSION
- 80/tcp open http nginx web server 0.8.16
- Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
- Nmap done: 1 IP address (1 host up) scanned in 6.97 seconds
- ———————————————————————————————————-
- nc
- pentest@yinyin:~$ nc -vv www.xxoo.com 80
- Connection to www.xxoo.info 80 port [tcp/www] succeeded!
- get http /1.1
- HTTP/1.1 400 Bad Request
- Date: Mon, 24 May 2010 11:54:35 GMT
- Server: Apache
- Connection: close
- Content-Type: text/html; charset=iso-8859-1……..省略
- ———————————————————————————————————-
- Curl
lCurl是一款用于在網(wǎng)絡(luò)上傳輸數(shù)據(jù)的工具,支持HTTP, HTTPS, FTP, FTPS, TFTP, DICT,TELNET,LDAP等協(xié)議。通過(guò)curl你既可以將服務(wù)器的數(shù)據(jù)下載下來(lái),也可以將本地的數(shù)據(jù)上傳到服務(wù)器。curl的選項(xiàng)很多,大家可以 參考curl 官方說(shuō)明!
- pentest@yinyin:~$ curl –head http://www.artist-tc.com/
- HTTP/1.1 200 OK
- Server: nginx/0.8.16
- Date: Mon, 24 May 2010 12:00:55 GMT
- Content-Type: text/html
- Connection: keep-alive
- Keep-Alive: timeout=20
- Vary: Accept-Encoding
- ———————————————————————————————————-
提供個(gè)可批量掃描的批處理!胡亂寫(xiě)的 將就下吧!
- echo FOR /F ^%%a IN (1.txt) DO nmap -sV -PN -p 80 ^%%a -r > scan.bat
- cmd.exe < scan.bat
- del /q /f scan.bat
- pause
把需要掃描的網(wǎng)址 IP IP段寫(xiě)進(jìn)1.txt就可以了!需要安裝nmap 不保存以及過(guò)濾結(jié)果 自行修改吧!
在來(lái)個(gè)curl掃描腳本!首先創(chuàng)建一個(gè)site.txt文件,里面輸入相應(yīng)的網(wǎng)站。
- pentest@ubuntu:~$ head site.txt
- g.cn
- baidu.com
- qq.com
- www.xxoo.com
之后結(jié)合下面的curl.sh腳本,就可以獲知site.txt中網(wǎng)站的服務(wù)器類型了。
- #!/bin/sh
- IIS=0
- nginx=0
- apache=0
- other=0
- if [ ! -f site.txt ]; then
- echo “ERROR:site.txt NOT exists!”
- exit 1
- fi
- total=`wc -l site.txt|awk ‘{print $1}’`
- for website in `cat site.txt`
- do
- server=`curl -Is –connect-timeout 15 $website|awk -F”:” ‘/^Server:/{print $2}’`
- echo -e $website”:” $server
- if echo $server|grep -i “IIS”>/dev/null
- then IIS=`expr $IIS + 1`
- elif echo $server|grep -i “Apache”>/dev/null
- then Apache=`expr $Apache + 1`
- elif echo $server|grep -i “nginx”>/dev/null
- then nginx=`expr $nginx + 1`
- else other=`expr $other + 1`
- fi
- done
- echo “——————————————–”
- echo -e “Total\tApache\tIIS\tnginx\tother”
- echo -e “$total\t$Apache\t$IIS\t$nginx\t$other”
- echo -e “100%\t”`echo “scale=5;$Apache/$total*100″|bc|cut -c1-5`”%\t”`echo “scale=5;$IIS/$total*100″|bc|cut -c1-5`”%\t”`echo “scale=5;$nginx/$total*100″|bc|cut -c1-5`”%\t”`echo “scale=5;$other/$total*100″|bc|cut -c1-5`”%\t”
- echo “——————————————–”
- exit 0
輸出結(jié)果:
- pentest@ubuntu:~$ ./curl.sh
- -e g.cn: gws
- -e baidu.com: Apache
- -e qq.com: nginx/0.6.39
- -e www.artist-tc.com: nginx/0.8.16
- ——————————————–
- -e Total Apache IIS nginx other
- -e 4 1 0 2 1
- -e 100% 25.00% 0% 50.00% 25.00%
- ——————————————–
Web服務(wù)器類型是怎么獲取的?我想大家已經(jīng)可以解答這個(gè)問(wèn)題了吧。
【編輯推薦】
- WEB安全防護(hù)解決方案
- 加固服務(wù)器防網(wǎng)絡(luò)被掛馬
- 淺析新浪微博Web蠕蟲(chóng)事件
- “應(yīng)用”是王道 錦囊妙計(jì)謀安全之駐守WEB安全
- Websense穩(wěn)坐Gartner Web安全網(wǎng)關(guān)魔力象限領(lǐng)導(dǎo)者地位
標(biāo)題名稱:獲取網(wǎng)站W(wǎng)eb服務(wù)器類型的辦法
網(wǎng)址分享:http://www.5511xx.com/article/cdcsgci.html


咨詢
建站咨詢
