Mercurial > hg > anonet-resdb
comparison contrib/splicex/src/splicex.pyx @ 858:fcddd2699d65 draft
added list(set(Word)) to modules. this sorts out duplicates
between modules and cuts down on processing + memory usage
author | d3v11 <d3v11@d3v11.ano> |
---|---|
date | Fri, 30 Dec 2011 11:02:37 +0000 |
parents | 5c86c4e82b4c |
children | 69a104eb11d6 |
comparison
equal
deleted
inserted
replaced
857:5e796992ae3e | 858:fcddd2699d65 |
---|---|
704 else: | 704 else: |
705 sys.exit(SpliceX + "error: -U list does not exist") | 705 sys.exit(SpliceX + "error: -U list does not exist") |
706 | 706 |
707 Word = [] | 707 Word = [] |
708 def REGULAR(): | 708 def REGULAR(): |
709 ReadDictionary = open(dictionary, 'r') | 709 global Word |
710 for line in ReadDictionary: | 710 ReadDictionary = open(dictionary, 'r') |
711 Word.append(line.replace('\n', '')) | 711 for line in ReadDictionary: |
712 Word.append(line.replace('\n', '')) | |
713 Word = list(set(Word)) | |
712 | 714 |
713 def L337(): | 715 def L337(): |
716 global Word | |
714 ReadDictionary = open(dictionary, 'r') | 717 ReadDictionary = open(dictionary, 'r') |
715 for line in ReadDictionary: | 718 for line in ReadDictionary: |
716 line = line.replace("a", "4", 1) | 719 line = line.replace("a", "4", 1) |
717 Word.append(line.replace('\n', '')) | 720 Word.append(line.replace('\n', '')) |
718 | 721 |
1116 line = line.replace("o", "0") | 1119 line = line.replace("o", "0") |
1117 line = line.replace("s", "5") | 1120 line = line.replace("s", "5") |
1118 line = line.replace("t", "7") | 1121 line = line.replace("t", "7") |
1119 line = line.replace("z", "2") | 1122 line = line.replace("z", "2") |
1120 Word.append(line.replace('\n', '')) | 1123 Word.append(line.replace('\n', '')) |
1124 Word = list(set(Word)) | |
1121 | 1125 |
1122 def BW(): | 1126 def BW(): |
1127 global Word | |
1123 ReadDictionary = open(dictionary, 'r') | 1128 ReadDictionary = open(dictionary, 'r') |
1124 for line in ReadDictionary: | 1129 for line in ReadDictionary: |
1125 Word.append(line[::-1].replace('\n', '')) | 1130 Word.append(line[::-1].replace('\n', '')) |
1131 Word = list(set(Word)) | |
1126 | 1132 |
1127 def CAPS(): | 1133 def CAPS(): |
1134 global Word | |
1128 ReadDictionary = open(dictionary, 'r') | 1135 ReadDictionary = open(dictionary, 'r') |
1129 for line in ReadDictionary: | 1136 for line in ReadDictionary: |
1130 line = line.replace('\n', '') | 1137 line = line.replace('\n', '') |
1131 up = 0 | 1138 up = 0 |
1132 a = "" | 1139 a = "" |
1521 ReadDictionary = open(dictionary, 'r') | 1528 ReadDictionary = open(dictionary, 'r') |
1522 for line in ReadDictionary: | 1529 for line in ReadDictionary: |
1523 line = line.replace("z", "Z") | 1530 line = line.replace("z", "Z") |
1524 if line.__contains__("Z"): | 1531 if line.__contains__("Z"): |
1525 Word.append(line.replace('\n', '')) | 1532 Word.append(line.replace('\n', '')) |
1533 Word = list(set(Word)) | |
1526 | 1534 |
1527 def MIX(): | 1535 def MIX(): |
1536 global Word | |
1528 for Input in MixChars: | 1537 for Input in MixChars: |
1529 ReadDictionary = open(dictionary, 'r') | 1538 ReadDictionary = open(dictionary, 'r') |
1530 for line in ReadDictionary: | 1539 for line in ReadDictionary: |
1531 line = line.replace('\n', '') | 1540 line = line.replace('\n', '') |
1532 up = 0 | 1541 up = 0 |
1590 c += Input + let + Input2 | 1599 c += Input + let + Input2 |
1591 else: | 1600 else: |
1592 c += let | 1601 c += let |
1593 b = b + 1 | 1602 b = b + 1 |
1594 Word.append(c) | 1603 Word.append(c) |
1604 Word = list(set(Word)) | |
1595 | 1605 |
1596 def MD5(): | 1606 def MD5(): |
1607 global Word | |
1597 ReadDictionary = open(dictionary, 'r') | 1608 ReadDictionary = open(dictionary, 'r') |
1598 for line in ReadDictionary: | 1609 for line in ReadDictionary: |
1599 Word.append(md5(line.replace('\n', '')).hexdigest()) | 1610 Word.append(md5(line.replace('\n', '')).hexdigest()) |
1611 Word = list(set(Word)) | |
1600 | 1612 |
1601 def WEP5(): | 1613 def WEP5(): |
1614 global Word | |
1602 ReadDictionary = open(dictionary, 'r') | 1615 ReadDictionary = open(dictionary, 'r') |
1603 for line in ReadDictionary: | 1616 for line in ReadDictionary: |
1604 i = 0 | 1617 i = 0 |
1605 for let in line: | 1618 for let in line: |
1606 i += 1 | 1619 i += 1 |
1607 i -= 1 | 1620 i -= 1 |
1608 if i == 5: | 1621 if i == 5: |
1609 line = line.encode('hex') | 1622 line = line.encode('hex') |
1610 line = line.replace('\n', '') | 1623 line = line.replace('\n', '') |
1611 Word.append(line.replace('0a', '')) | 1624 Word.append(line.replace('0a', '')) |
1625 Word = list(set(Word)) | |
1612 | 1626 |
1613 def WEP13(): | 1627 def WEP13(): |
1628 global Word | |
1614 ReadDictionary = open(dictionary, 'r') | 1629 ReadDictionary = open(dictionary, 'r') |
1615 for line in ReadDictionary: | 1630 for line in ReadDictionary: |
1616 i = 0 | 1631 i = 0 |
1617 for let in line: | 1632 for let in line: |
1618 i += 1 | 1633 i += 1 |
1619 i -= 1 | 1634 i -= 1 |
1620 if i == 13: | 1635 if i == 13: |
1621 line = line.encode('hex') | 1636 line = line.encode('hex') |
1622 line = line.replace('\n', '') | 1637 line = line.replace('\n', '') |
1623 Word.append(line.replace('0a', '')) | 1638 Word.append(line.replace('0a', '')) |
1639 Word = list(set(Word)) | |
1624 | 1640 |
1625 | 1641 |
1626 def SOCEN(): | 1642 def SOCEN(): |
1643 global Word | |
1627 socen = [] | 1644 socen = [] |
1628 socen_a = [] | 1645 socen_a = [] |
1629 socen_words = [] | 1646 socen_words = [] |
1630 | 1647 |
1631 try: | 1648 try: |
1671 | 1688 |
1672 for a in socen_words: | 1689 for a in socen_words: |
1673 for b in socen_words: | 1690 for b in socen_words: |
1674 for c in socen_words: | 1691 for c in socen_words: |
1675 if a != b and a != c and b != c: | 1692 if a != b and a != c and b != c: |
1676 Word.append(a + b + c) | 1693 Word.append(a + b + c) |
1694 Word = list(set(Word)) | |
1677 | 1695 |
1678 | 1696 |
1679 if RegularSwitch is True: | 1697 if RegularSwitch is True: |
1680 REGULAR() | 1698 REGULAR() |
1681 if BWSwitch is True: | 1699 if BWSwitch is True: |