Example #1
0
File: hfn.py Project: ziqi521/CUS
def check(site):
    site = www.get_domain(site)
    html = http_request('http://hosts-file.net/?s=%s' % site)
    regex = '''<td\sclass="main_normal"\salign="left"\scolspan="1"\sstyle="[^>]*?">.*?\s*?([^\n]*?)\s\(<a\sclass="main\_normal\_noborder"'''
    result = re.search(regex, html, re.S)
    level = {
        'Not Specified': 'unknown',
        'TBV': 'unknown',
        'ATS': 'safe',
        'GRM': 'warning',
        'HFS': 'warning',
        'MMT': 'danger',
        'WRZ': 'danger',
        'PSH': 'danger',
        'HJK': 'danger',
        'FSA': 'danger',
        'EMD': 'danger',
        'EXP': 'danger'
    }
    if result:
        msg = result.group(1).strip()
    else:
        msg = 'Not Specified'
    check_result = level.get(msg, 'unknown')
    return check_result
Example #2
0
def check(site):
	site = www.get_domain(site)
	html = http_request('http://www.spamhaus.org/query/domain/%s'%site)	
	regex = '''<B><FONT\scolor="green">(.*?\sis\snot\slisted\sin\sthe\sDBL)</FONT></B><br>'''
	result = re.search(regex,html)
	if result:
		check_result = 'safe'
	else:
		check_result = 'danger'
	return check_result
Example #3
0
File: spt.py Project: ziqi521/CUS
def check(site):
	site = www.get_domain(site)
	html = http_request('https://spyeyetracker.abuse.ch/monitor.php?host=%s'%site)	
	regex = '''<tr\sbgcolor="#.*?"><td>Level:</td><td>(\d)\s\(.*?\)</td></tr>'''
	level = {'1':'danger','2':'danger','5':'warning','3':'warning','4':'unknown'}
	result = re.search(regex,html)
	if result:
		msg = result.group(1)
	else:
		msg = '4'
	check_result = level.get(msg,'unknown')
	return check_result
Example #4
0
File: mcf.py Project: apoyl/CUS
def check(site):
	site = www.get_domain(site)
	html = http_request('http://www.siteadvisor.com/sites/%s'%site)	
	regex = '''<img\ssrc="/images/.*?\.gif"\salt="([a-zA-Z]*?)\sVerdict\sImage"\sborder="0"\s/>'''
	level = {'Red':'danger','Green':'safe','Grey':'unknown','Yellow':'warning'}
	result = re.search(regex,html)
	if result:
		color = result.group(1)
	else:
		color = 'Grey'
	check_result = level.get(color,'unknown')
	return check_result
Example #5
0
File: rix.py Project: apoyl/CUS
def check(site):
	site = www.get_domain(site)
	html = http_request('http://site.ikaka.com/Index/domaininfo/%s'%site)	
	regex = '''<h1\sid="domaintd"\sclass="state-title">(.*?)</h1>'''
	level = {'不安全,该网站存在恶意行为,不建议进行访问。':'danger','安全,未在该网站发现重大的安全问题。':'safe','未知,还未对此网站进行检测,欢迎发表你的看法。':'unknown'}
	result = re.search(regex,html)
	if result:
		msg = result.group(1)
	else:
		msg = '未知,还未对此网站进行检测,欢迎发表你的看法。'
	check_result = level.get(msg,'unknown')
	return check_result
Example #6
0
def check(site):
    site = www.get_domain(site)
    html = http_request("http://www.websecurityguard.com/detail.aspx?domain=%s" % site)
    regex = """<div\sid="website-head"\sclass="class-([a-z]*?)">"""
    level = {"red": "danger", "green": "safe", "grey": "unknown", "orange": "warning"}
    result = re.search(regex, html)
    if result:
        color = result.group(1)
    else:
        color = "grey"

    check_result = level.get(color, "unknown")
    return check_result
Example #7
0
File: hfn.py Project: apoyl/CUS
def check(site):
	site = www.get_domain(site)
	html = http_request('http://hosts-file.net/?s=%s'%site)	
	regex = '''<td\sclass="main_normal"\salign="left"\scolspan="1"\sstyle="[^>]*?">.*?\s*?([^\n]*?)\s\(<a\sclass="main\_normal\_noborder"'''
	result = re.search(regex,html,re.S)
	level = {'Not Specified':'unknown','TBV':'unknown','ATS':'safe','GRM':'warning','HFS':'warning',
		'MMT':'danger','WRZ':'danger','PSH':'danger','HJK':'danger','FSA':'danger',
		'EMD':'danger','EXP':'danger'}
	if result:
		msg = result.group(1).strip()
	else:
		msg = 'Not Specified'
	check_result = level.get(msg,'unknown')
	return check_result
Example #8
0
File: rix.py Project: ziqi521/CUS
def check(site):
    site = www.get_domain(site)
    html = http_request('http://site.ikaka.com/Index/domaininfo/%s' % site)
    regex = '''<h1\sid="domaintd"\sclass="state-title">(.*?)</h1>'''
    level = {
        '不安全,该网站存在恶意行为,不建议进行访问。': 'danger',
        '安全,未在该网站发现重大的安全问题。': 'safe',
        '未知,还未对此网站进行检测,欢迎发表你的看法。': 'unknown'
    }
    result = re.search(regex, html)
    if result:
        msg = result.group(1)
    else:
        msg = '未知,还未对此网站进行检测,欢迎发表你的看法。'
    check_result = level.get(msg, 'unknown')
    return check_result
Example #9
0
File: mcf.py Project: ziqi521/CUS
def check(site):
    site = www.get_domain(site)
    html = http_request('http://www.siteadvisor.com/sites/%s' % site)
    regex = '''<img\ssrc="/images/.*?\.gif"\salt="([a-zA-Z]*?)\sVerdict\sImage"\sborder="0"\s/>'''
    level = {
        'Red': 'danger',
        'Green': 'safe',
        'Grey': 'unknown',
        'Yellow': 'warning'
    }
    result = re.search(regex, html)
    if result:
        color = result.group(1)
    else:
        color = 'Grey'
    check_result = level.get(color, 'unknown')
    return check_result
Example #10
0
File: wsg.py Project: ziqi521/CUS
def check(site):
    site = www.get_domain(site)
    html = http_request(
        'http://www.websecurityguard.com/detail.aspx?domain=%s' % site)
    regex = '''<div\sid="website-head"\sclass="class-([a-z]*?)">'''
    level = {
        'red': 'danger',
        'green': 'safe',
        'grey': 'unknown',
        'orange': 'warning'
    }
    result = re.search(regex, html)
    if result:
        color = result.group(1)
    else:
        color = 'grey'

    check_result = level.get(color, 'unknown')
    return check_result