Skip to content

Commit

Permalink
significant update
Browse files Browse the repository at this point in the history
1. polish code and reconfiguration
2. add leet mode function
3. add pick function
4. greatly enhance extend、passcraper and SEDB function
5. greatly enhance  wordlist customized
6. others
  • Loading branch information
LandGrey committed May 5, 2017
1 parent 4d2d899 commit 6e21a47
Show file tree
Hide file tree
Showing 71 changed files with 9,912,231 additions and 1,975 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.xml
*.iml
*.pyc
*.pyc
/test
444 changes: 274 additions & 170 deletions README.md

Large diffs are not rendered by default.

387 changes: 387 additions & 0 deletions README_CN.md

Large diffs are not rendered by default.

270 changes: 0 additions & 270 deletions README_EN.md

This file was deleted.

6 changes: 3 additions & 3 deletions build.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pydictor parser configuration file
# Build By LandGrey
# Copyright (c) 2016-2017 pydictor developers (https://github.com/LandGrey/pydictor)
# Copyright (c) 2016-2017 LandGrey (https://github.com/LandGrey/pydictor)
# License: GNU GENERAL PUBLIC LICENSE Version 3
#
########################################################################################################################
Expand All @@ -17,7 +17,7 @@
# and using specified char -> A admin
# final using characters is -> 0 1 2 3 4 5 6 a b c A admin
#
# 3:6 represent minimum length is 2 and maximum length is 4, head and tail is all excluded
# {3:6} represent minimum length is 3 and maximum length is 6, head and tail is all excluded
#
# encode-type choice:
# none don't encode
Expand All @@ -31,4 +31,4 @@
#
########################################################################################################################

a[6-8,a-c,R,admin]{1:3}<none>,_[o-r]{1:1}<none>[abc,123.,xyz]{1:1}<none>
a[1-3,@,123,qwer,qwert]{1:1}<none>[0-9]{1:2}<none>[xyz,admin]{1:1}<none>[,.,_]{1:1}<none>
60 changes: 31 additions & 29 deletions core/BASE.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/usr/bin/env python
# coding:utf-8
# Build a dictionary based on common character set
#
"""
Copyright (c) 2016-2017 pydictor developers (https://github.com/LandGrey/pydictor)
Copyright (c) 2016-2017 LandGrey (https://github.com/LandGrey/pydictor)
License: GNU GENERAL PUBLIC LICENSE Version 3
"""

from __future__ import unicode_literals

import os
import string
import itertools
from lib.fun import finishprinter, finishcounter, countchecker, range_compatible
from lib.data import get_result_store_path, get_buildtime, operator, CRLF, BASE_prefix, CHAR_prefix, filextension, \
base_dic_type
from lib.data.data import paths, pystrs, pyoptions
from lib.fun.fun import finishprinter, finishcounter, countchecker, range_compatible, mybuildtime

# dictionary type
description = "init"
Expand All @@ -23,45 +23,47 @@ def getchars(type, need_char=False):
global description
flag = str(type)
chars = []
if type in base_dic_type and not need_char:
if flag == base_dic_type[0]:
if type in pystrs.base_dic_type and not need_char:
if flag == pystrs.base_dic_type[0]:
chars = string.digits
description = 'digits'
elif flag == base_dic_type[1]:
description = 'd'
elif flag == pystrs.base_dic_type[1]:
chars = string.ascii_lowercase
description = 'lowercase'
elif flag == base_dic_type[2]:
description = 'L'
elif flag == pystrs.base_dic_type[2]:
chars = string.ascii_uppercase
description = 'uppercase'
elif flag == base_dic_type[3]:
description = 'c'
elif flag == pystrs.base_dic_type[3]:
chars = string.printable[:36]
description = 'digits_lowercase'
elif flag == base_dic_type[4]:
description = 'dL'
elif flag == pystrs.base_dic_type[4]:
chars = string.digits + string.ascii_uppercase
description = 'digits_uppercase'
elif flag == base_dic_type[5]:
description = 'dc'
elif flag == pystrs.base_dic_type[5]:
chars = string.ascii_letters
description = 'letters'
elif flag == base_dic_type[6]:
description = 'Lc'
elif flag == pystrs.base_dic_type[6]:
chars = string.printable[:62]
description = 'digits_letters'
description = 'dLc'
return chars
elif need_char:
description = "chars"
description = "C"
return type


def get_base_dic(minlength, maxlength, objflag, encodeflag, head, tail, need_char_dic=False):
def get_base_dic(objflag, need_char_dic=False):
objflag = getchars(objflag, need_char=need_char_dic)
countchecker(len(objflag), minlength, maxlength)
countchecker(len(objflag), pyoptions.minlen, pyoptions.maxlen)
global description
dict_prefix = BASE_prefix
dict_prefix = pystrs.BASE_prefix
if need_char_dic:
dict_prefix = CHAR_prefix
storepath = os.path.join(get_result_store_path(), "%s_%s_%s_%s_%s_%s%s" %
(dict_prefix, minlength, maxlength, description, get_buildtime(), encodeflag, filextension))
dict_prefix = pystrs.CHAR_prefix
storepath = os.path.join(paths.results_path, "%s_%s_%s_%s_%s%s" % (dict_prefix, pyoptions.minlen,
pyoptions.maxlen, description,
mybuildtime(), pyoptions.filextension))
with open(storepath, "a") as f:
for i in range_compatible(minlength, maxlength+1):
for i in range_compatible(pyoptions.minlen, pyoptions.maxlen+1):
for item in itertools.product(objflag, repeat=i):
f.write(operator.get(encodeflag)(head + "".join(item) + tail) + CRLF)
f.write(pyoptions.operator.get(pyoptions.encode)(pyoptions.head +
"".join(item) + pyoptions.tail) + pyoptions.CRLF)
finishprinter(finishcounter(storepath), storepath)
Loading

0 comments on commit 6e21a47

Please sign in to comment.