コード例 #1
0
def _call_htpasswd(args, stdin=None):
    """
    helper to run htpasswd cmd
    """
    if stdin is not None:
        stdin = stdin.encode("utf-8")
    proc = subprocess.Popen([htpasswd_path] + args,
                            stdout=subprocess.PIPE,
                            stderr=subprocess.STDOUT,
                            stdin=subprocess.PIPE if stdin else None)
    out, err = proc.communicate(stdin)
    rc = proc.wait()
    out = to_unicode_for_identify(out or "")
    return out, rc
コード例 #2
0
 def identify(cls, hash):
     # NOTE: identifies all strings EXCEPT those with {XXX} prefix
     hash = uh.to_unicode_for_identify(hash)
     return bool(hash) and cls._2307_pat.match(hash) is None
コード例 #3
0
ファイル: bcrypt.py プロジェクト: docovarr2020/DIYnow
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     if not hash:
         return False
     return hash.startswith(cls.prefix)
コード例 #4
0
ファイル: django.py プロジェクト: bbBradenbb/gae-starter-kit
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     return hash == u("!")
コード例 #5
0
ファイル: sun_md5_crypt.py プロジェクト: marta90/Projekt
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     return hash.startswith(cls.ident_values)
コード例 #6
0
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     return hash.startswith(cls.ident_values)
コード例 #7
0
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     return hash.startswith(u("!"))
コード例 #8
0
ファイル: bcrypt.py プロジェクト: cutso/passlib
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     if not hash:
         return False
     return hash.startswith(cls.prefix)
コード例 #9
0
 def identify(cls, hash):
     # NOTE: identifies all strings EXCEPT those with {XXX} prefix
     hash = uh.to_unicode_for_identify(hash)
     return bool(hash) and cls._2307_pat.match(hash) is None
コード例 #10
0
ファイル: django.py プロジェクト: Kiln707/Passlib2
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     return hash.startswith(cls._hash_prefix)
コード例 #11
0
ファイル: argon2.py プロジェクト: Sriramg89/Restaurant
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     return cls._ident_regex.match(hash) is not None
コード例 #12
0
ファイル: django.py プロジェクト: dragoncsc/HDsite
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     return hash.startswith(cls._hash_prefix)
コード例 #13
0
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     return hash == u("!")
コード例 #14
0
ファイル: django.py プロジェクト: cutso/passlib
 def identify(cls, hash):
     hash = uh.to_unicode_for_identify(hash)
     return hash.startswith(u("!"))