-
Notifications
You must be signed in to change notification settings - Fork 641
/
Copy pathSingleRule.py
46 lines (42 loc) · 1.17 KB
/
SingleRule.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
# coding:utf-8
# Single item rule
"""
Copyright (c) 2016-2017 LandGrey (https://github.com/LandGrey/pydictor)
License: GNU GENERAL PUBLIC LICENSE Version 3
"""
from __future__ import unicode_literals
from rules.BaseTrick import wordshaper
def SingleRule(cname, ename, sname, birth, usedpwd, phone, uphone, hphone, email, postcode, nickname, idcard, jobnum,
otherdate, usedchar):
for _ in wordshaper(cname, ename, sname, usedpwd, email, nickname, usedchar):
yield _
for bd in birth:
yield bd
yield bd[2:]
yield bd[:4] + bd[4:].replace('0', '')
for ph in phone:
yield ph
for uph in uphone:
yield uph
for hp in hphone:
yield hp
for em in email:
yield em
# {@xxx.xxx}
yield '@' + em.split('@')[1]
for pc in postcode:
yield pc
for ic in idcard:
yield ic[:6]
yield ic[-4:]
yield ic[-6:]
yield ic[-8:]
for jn in jobnum:
yield jn
for od in otherdate:
yield od
yield od[2:]
yield od[:4] + od[4:].replace('0', '')
# You can continue to add new and useful rules
#