update antispam

This commit is contained in:
Romain Bignon 2011-10-09 20:35:12 +02:00
commit e4248c1e39

View file

@ -49,15 +49,18 @@ class AntiSpam(object):
return False return False
if profile['about2'].endswith('mmmmmmmmmmmmmmmm'): if profile['about2'].endswith('mmmmmmmmmmmmmmmm'):
return False return False
if profile['last_ip'].startswith('41.202.'): for ipaddr in (profile['last_ip'], profile['first_ip']):
if ipaddr.startswith('41.202.'):
return False return False
if profile['last_ip'].startswith('41.250.'): if ipaddr.startswith('41.250.'):
return False return False
if profile['last_ip'].startswith('41.141.'): if ipaddr.startswith('41.141.'):
return False return False
if profile['last_ip'].startswith('194.177.'): if ipaddr.startswith('194.177.'):
return False return False
if profile['last_ip'] in ('62.157.186.18', '198.36.222.8', '212.234.67.61'): if re.match('105\.13\d.*', ipaddr):
return False
if ipaddr in ('62.157.186.18', '198.36.222.8', '212.234.67.61'):
return False return False
return True return True
@ -65,10 +68,12 @@ class AntiSpam(object):
if not self.check_profile(contact.aum_profile): if not self.check_profile(contact.aum_profile):
return False return False
ipaddr = contact.profile['info']['IPaddr'].value.split(' ')[0] first_ip = contact.profile['info']['IPaddr'].value.split(' ')[0]
if contact.profile['info']['IPaddr'].value.rstrip(')').endswith('.afnet.net'): last_ip = contact.profile['info']['IPaddr'].value.rstrip(')')
for ipaddr in (first_ip, last_ip):
if ipaddr.endswith('.afnet.net'):
return False return False
if contact.profile['info']['IPaddr'].value.rstrip(')').endswith('.iam.net.ma'): if ipaddr.endswith('.iam.net.ma'):
return False return False
if ipaddr.endswith('.amsterdam.ananoos.net'): if ipaddr.endswith('.amsterdam.ananoos.net'):
return False return False
@ -90,6 +95,12 @@ class AntiSpam(object):
return False return False
if ipaddr.endswith('.ukservers.com'): if ipaddr.endswith('.ukservers.com'):
return False return False
if ipaddr.endswith('.startdedicated.com'):
return False
if ipaddr.endswith('.clients.your-server.de'):
return False
if ipaddr.endswith('.cba.embratel.net.br'):
return False
return True return True
def check_mail(self, mail): def check_mail(self, mail):