目录

用户筛选规则

# user:MD5password:Real Name:email:groups,comma,seperated
cqbai:$1$2x18a98c$UiW1/PrkNv6SBlzTmCccc.:白翠琴:cqbai@fudan.edu.cn:user,phylab

白名单列表

讨论

hotmail gmail foxmail yahoo 等邮箱注册的帐号算正确吗? — 乐永康 2014/12/31 23:31
很多机器人用的是以上邮箱。

新账号注册规则中加上几个特点的邮箱服务器要求,估计就能防止机器人注册了。 — 乐永康 2014/12/31 23:31

可以提示注册不成功,但是比较麻烦。

代码测试

class people0:
    passwd = '123'
    idnum = '0519103'
    name='曾琪'
    email='0519103@fudan.edu.cn'
    group='user'
  
rulea='05191203@fudan.edu.cn'

class people1:
    passwd = '235645670'
    idnum = '05192103'
    name='曾2琪'
    email='05191203@fudan.edu.cn'
    group='us2er'
    @staticmethod




    

    def getpasswd():
        return people1.passwd
    def getidnum():
        return people1.idnum
    def getname():
        return people1.name
    def getemail():
        return people1.email
    def getgroup():
        return people1.group
    
    def checkemail():
        if people1.getemail() == rulea:
            return 'yes'

print(people1.getidnum())
print(people1.getname())
print(people1.getemail())
print(people1.getgroup())
print(people1.getpasswd())
print("%s\n" %(people1.checkemail()))
g = open("D:/pytest/012.txt", "a")
if people1.checkemail()=='yes':
    g.writelines("%s is passed in rulea\n" %(people1.getidnum()))
    print('printok')
g.close()