python 扫面特定网页

#!/usr/bin/env python
import httplib,sys

file=open('d:/1.txt')
lines=file.readlines()
for line in lines:
    try:
        conn = httplib.HTTPConnection(line.strip())  
        conn.request('get', '/phpmyadmin/')
        content=conn.getresponse().read()
    except:
        continue
    #print content
    if 'phpMyAdmin' in content:
        print line.strip()+' phpmyadmin exist \n'

你可能感兴趣的:(python,职场,休闲,扫面网页)