#coding:utf-8importurllib2importredefcheck(url):response=urllib2.urlopen(url)html=response.read()pattern=re.compile(r'
#coding:utf-8
import urllib2
import re
def check(url):
response = urllib2.urlopen(url)
html=response.read()
pattern = re.compile(r'')
if pattern.search(html):
return True
pattern = re.compile(r'')
if pattern.search(html):
return True
patterns = [r'.+', r'
.+', r'.+', r'.+']for pattern in patterns:
pattern = re.compile(pattern)
count = len(pattern.findall(html))
if count > 1:
return True
patterns = [r'', r'
for pattern in patterns:
pattern = re.compile(pattern)
count = len(pattern.findall(html))
if count > 233:
return True
count = 0
patterns = [r'', r'', r'']
for pattern in patterns:
pattern = re.compile(pattern)
count += len(pattern.findall(html))
if count > 233:
return True
pattern = re.compile(r'eval\(')
count = len(pattern.findall(html))
if count > 233:
return True
return False
十分感谢!!!
展开