예제 #1
0
def testPass(cryptPass):
    salt = cryptPass[0:2]
    dictFile = open('dictionary.txt')
    for word in dictFile.readlines():
        word = word.strip('\n')
        cryptWord = _crypt.crypt(word, salt)
        if cryptWord == cryptPass:
            print('[+] Found Password: '******'[-] Password not Found.\n')
    return
예제 #2
0
def crypt(word, salt=None):
    """Return a string representing the one-way hash of a password, with a salt
    prepended.

    If ``salt`` is not specified or is ``None``, the strongest
    available method will be selected and a salt generated.  Otherwise,
    ``salt`` may be one of the ``crypt.METHOD_*`` values, or a string as
    returned by ``crypt.mksalt()``.

    """
    if salt is None or isinstance(salt, _Method):
        salt = mksalt(salt)
    return _crypt.crypt(word, salt)
예제 #3
0
def crypt(word, salt=None):
    """Return a string representing the one-way hash of a password, with a salt
    prepended.

    If ``salt`` is not specified or is ``None``, the strongest
    available method will be selected and a salt generated.  Otherwise,
    ``salt`` may be one of the ``crypt.METHOD_*`` values, or a string as
    returned by ``crypt.mksalt()``.

    """
    if salt is None or isinstance(salt, _Method):
        salt = mksalt(salt)
    return _crypt.crypt(word, salt)
예제 #4
0
파일: crypt.py 프로젝트: openebs/vsm-image
def crypt(word, salt=None):
    """Return a string representing the one-way hash of a password, with a salt
    prepended.

    If ``salt`` is not specified or is ``None``, the strongest
    available method will be selected and a salt generated.  Otherwise,
    ``salt`` may be one of the ``crypt.METHOD_*`` values, or a string as
    returned by ``crypt.mksalt()``.

    Note that these are non-standard extensions to Python 2.7's crypt.crypt()
    entrypoint, backported from 3.3: the standard Python 2.7 crypt.crypt()
    entrypoint requires two strings as the parameters, and does not support
    keyword arguments.
    """
    if salt is None or isinstance(salt, _Method):
        salt = mksalt(salt)
    return _crypt.crypt(word, salt)
예제 #5
0
파일: crypt.py 프로젝트: yoooknight/Python
def crypt(word, salt=None):
    """Return a string representing the one-way hash of a password, with a salt
    prepended.

    If ``salt`` is not specified or is ``None``, the strongest
    available method will be selected and a salt generated.  Otherwise,
    ``salt`` may be one of the ``crypt.METHOD_*`` values, or a string as
    returned by ``crypt.mksalt()``.

    Note that these are non-standard extensions to Python 2.6's crypt.crypt()
    entrypoint, backported from 3.3: the standard Python 2.6 crypt.crypt()
    entrypoint requires two strings as the parameters, and does not support
    keyword arguments.
    """
    if salt is None or isinstance(salt, _Method):
        salt = mksalt(salt)
    return _crypt.crypt(word, salt)
예제 #6
0
def crypt(word, salt=None):
    if salt is None or isinstance(salt, _Method):
        salt = mksalt(salt)
    return _crypt.crypt(word, salt)
예제 #7
0
def crypt(word, salt=None):
    if salt is None or isinstance(salt, _Method):
        salt = mksalt(salt)
    return _crypt.crypt(word, salt)