Linux server.nvwebsoft.co.in 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
Apache
: 162.240.12.249 | : 18.227.0.21
202 Domain
8.1.31
nbspublicschool
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python2.7 /
site-packages /
passlib /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
__init__.py
20
B
-rw-r--r--
__init__.pyc
181
B
-rw-r--r--
__init__.pyo
181
B
-rw-r--r--
__main__.py
82
B
-rw-r--r--
__main__.pyc
293
B
-rw-r--r--
__main__.pyo
293
B
-rw-r--r--
_test_bad_register.py
541
B
-rw-r--r--
_test_bad_register.pyc
919
B
-rw-r--r--
_test_bad_register.pyo
919
B
-rw-r--r--
backports.py
2.45
KB
-rw-r--r--
backports.pyc
1.23
KB
-rw-r--r--
backports.pyo
1.23
KB
-rw-r--r--
sample1.cfg
243
B
-rw-r--r--
sample1b.cfg
252
B
-rw-r--r--
sample1c.cfg
490
B
-rw-r--r--
sample_config_1s.cfg
238
B
-rw-r--r--
test_apache.py
24.62
KB
-rw-r--r--
test_apache.pyc
19.72
KB
-rw-r--r--
test_apache.pyo
19.72
KB
-rw-r--r--
test_apps.py
5.16
KB
-rw-r--r--
test_apps.pyc
5.83
KB
-rw-r--r--
test_apps.pyo
5.83
KB
-rw-r--r--
test_context.py
73.28
KB
-rw-r--r--
test_context.pyc
41.4
KB
-rw-r--r--
test_context.pyo
41.4
KB
-rw-r--r--
test_context_deprecated.py
28.6
KB
-rw-r--r--
test_context_deprecated.pyc
20.16
KB
-rw-r--r--
test_context_deprecated.pyo
20.09
KB
-rw-r--r--
test_crypto_builtin_md4.py
5.53
KB
-rw-r--r--
test_crypto_builtin_md4.pyc
5.87
KB
-rw-r--r--
test_crypto_builtin_md4.pyo
5.87
KB
-rw-r--r--
test_crypto_des.py
8.67
KB
-rw-r--r--
test_crypto_des.pyc
6.54
KB
-rw-r--r--
test_crypto_des.pyo
6.54
KB
-rw-r--r--
test_crypto_digest.py
18.23
KB
-rw-r--r--
test_crypto_digest.pyc
13.23
KB
-rw-r--r--
test_crypto_digest.pyo
13.23
KB
-rw-r--r--
test_crypto_scrypt.py
25.05
KB
-rw-r--r--
test_crypto_scrypt.pyc
20.88
KB
-rw-r--r--
test_crypto_scrypt.pyo
20.8
KB
-rw-r--r--
test_ext_django.py
32.04
KB
-rw-r--r--
test_ext_django.pyc
21.11
KB
-rw-r--r--
test_ext_django.pyo
20.84
KB
-rw-r--r--
test_ext_django_source.py
10.78
KB
-rw-r--r--
test_ext_django_source.pyc
6.91
KB
-rw-r--r--
test_ext_django_source.pyo
6.86
KB
-rw-r--r--
test_handlers.py
61.31
KB
-rw-r--r--
test_handlers.pyc
59.5
KB
-rw-r--r--
test_handlers.pyo
59.5
KB
-rw-r--r--
test_handlers_argon2.py
16.55
KB
-rw-r--r--
test_handlers_argon2.pyc
13.29
KB
-rw-r--r--
test_handlers_argon2.pyo
13.2
KB
-rw-r--r--
test_handlers_bcrypt.py
22.96
KB
-rw-r--r--
test_handlers_bcrypt.pyc
19.19
KB
-rw-r--r--
test_handlers_bcrypt.pyo
19.04
KB
-rw-r--r--
test_handlers_cisco.py
19.99
KB
-rw-r--r--
test_handlers_cisco.pyc
17.21
KB
-rw-r--r--
test_handlers_cisco.pyo
17.21
KB
-rw-r--r--
test_handlers_django.py
14.75
KB
-rw-r--r--
test_handlers_django.pyc
15.65
KB
-rw-r--r--
test_handlers_django.pyo
15.54
KB
-rw-r--r--
test_handlers_pbkdf2.py
18.35
KB
-rw-r--r--
test_handlers_pbkdf2.pyc
16.76
KB
-rw-r--r--
test_handlers_pbkdf2.pyo
16.76
KB
-rw-r--r--
test_handlers_scrypt.py
4.03
KB
-rw-r--r--
test_handlers_scrypt.pyc
3.99
KB
-rw-r--r--
test_handlers_scrypt.pyo
3.99
KB
-rw-r--r--
test_hosts.py
3.81
KB
-rw-r--r--
test_hosts.pyc
3.76
KB
-rw-r--r--
test_hosts.pyo
3.76
KB
-rw-r--r--
test_pwd.py
7.02
KB
-rw-r--r--
test_pwd.pyc
6.3
KB
-rw-r--r--
test_pwd.pyo
6.3
KB
-rw-r--r--
test_registry.py
9.24
KB
-rw-r--r--
test_registry.pyc
7.53
KB
-rw-r--r--
test_registry.pyo
7.53
KB
-rw-r--r--
test_totp.py
64.03
KB
-rw-r--r--
test_totp.pyc
39.25
KB
-rw-r--r--
test_totp.pyo
39.07
KB
-rw-r--r--
test_utils.py
39.3
KB
-rw-r--r--
test_utils.pyc
29.78
KB
-rw-r--r--
test_utils.pyo
29.78
KB
-rw-r--r--
test_utils_handlers.py
31.38
KB
-rw-r--r--
test_utils_handlers.pyc
28.56
KB
-rw-r--r--
test_utils_handlers.pyo
28.5
KB
-rw-r--r--
test_utils_md4.py
1.44
KB
-rw-r--r--
test_utils_md4.pyc
1.55
KB
-rw-r--r--
test_utils_md4.pyo
1.55
KB
-rw-r--r--
test_utils_pbkdf2.py
11.82
KB
-rw-r--r--
test_utils_pbkdf2.pyc
10.3
KB
-rw-r--r--
test_utils_pbkdf2.pyo
10.3
KB
-rw-r--r--
test_win32.py
1.88
KB
-rw-r--r--
test_win32.pyc
1.98
KB
-rw-r--r--
test_win32.pyo
1.98
KB
-rw-r--r--
tox_support.py
2.42
KB
-rw-r--r--
tox_support.pyc
2.78
KB
-rw-r--r--
tox_support.pyo
2.78
KB
-rw-r--r--
utils.py
135.08
KB
-rw-r--r--
utils.pyc
92.93
KB
-rw-r--r--
utils.pyo
92.48
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_crypto_builtin_md4.py
"""passlib.tests -- unittests for passlib.crypto._md4""" #============================================================================= # imports #============================================================================= from __future__ import with_statement, division # core from binascii import hexlify import hashlib # site # pkg # module from passlib.utils.compat import bascii_to_str, PY3, u from passlib.crypto.digest import lookup_hash from passlib.tests.utils import TestCase, skipUnless # local __all__ = [ "_Common_MD4_Test", "MD4_Builtin_Test", "MD4_SSL_Test", ] #============================================================================= # test pure-python MD4 implementation #============================================================================= class _Common_MD4_Test(TestCase): """common code for testing md4 backends""" vectors = [ # input -> hex digest # test vectors from http://www.faqs.org/rfcs/rfc1320.html - A.5 (b"", "31d6cfe0d16ae931b73c59d7e0c089c0"), (b"a", "bde52cb31de33e46245e05fbdbd6fb24"), (b"abc", "a448017aaf21d8525fc10ae87aa6729d"), (b"message digest", "d9130a8164549fe818874806e1c7014b"), (b"abcdefghijklmnopqrstuvwxyz", "d79e1c308aa5bbcdeea8ed63df412da9"), (b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", "043f8582f241db351ce627e153e7f0e4"), (b"12345678901234567890123456789012345678901234567890123456789012345678901234567890", "e33b4ddc9c38f2199c3e7b164fcc0536"), ] def get_md4_const(self): """ get md4 constructor -- overridden by subclasses to use alternate backends. """ return lookup_hash("md4").const def test_attrs(self): """informational attributes""" h = self.get_md4_const()() self.assertEqual(h.name, "md4") self.assertEqual(h.digest_size, 16) self.assertEqual(h.block_size, 64) def test_md4_update(self): """update() method""" md4 = self.get_md4_const() h = md4(b'') self.assertEqual(h.hexdigest(), "31d6cfe0d16ae931b73c59d7e0c089c0") h.update(b'a') self.assertEqual(h.hexdigest(), "bde52cb31de33e46245e05fbdbd6fb24") h.update(b'bcdefghijklmnopqrstuvwxyz') self.assertEqual(h.hexdigest(), "d79e1c308aa5bbcdeea8ed63df412da9") if PY3: # reject unicode, hash should return digest of b'' h = md4() self.assertRaises(TypeError, h.update, u('a')) self.assertEqual(h.hexdigest(), "31d6cfe0d16ae931b73c59d7e0c089c0") else: # coerce unicode to ascii, hash should return digest of b'a' h = md4() h.update(u('a')) self.assertEqual(h.hexdigest(), "bde52cb31de33e46245e05fbdbd6fb24") def test_md4_hexdigest(self): """hexdigest() method""" md4 = self.get_md4_const() for input, hex in self.vectors: out = md4(input).hexdigest() self.assertEqual(out, hex) def test_md4_digest(self): """digest() method""" md4 = self.get_md4_const() for input, hex in self.vectors: out = bascii_to_str(hexlify(md4(input).digest())) self.assertEqual(out, hex) def test_md4_copy(self): """copy() method""" md4 = self.get_md4_const() h = md4(b'abc') h2 = h.copy() h2.update(b'def') self.assertEqual(h2.hexdigest(), '804e7f1c2586e50b49ac65db5b645131') h.update(b'ghi') self.assertEqual(h.hexdigest(), 'c5225580bfe176f6deeee33dee98732c') #------------------------------------------------------------------------ # create subclasses to test various backends #------------------------------------------------------------------------ def has_native_md4(): # pragma: no cover -- runtime detection """ check if hashlib natively supports md4. """ try: hashlib.new("md4") return True except ValueError: # not supported - ssl probably missing (e.g. ironpython) return False @skipUnless(has_native_md4(), "hashlib lacks ssl/md4 support") class MD4_SSL_Test(_Common_MD4_Test): descriptionPrefix = "hashlib.new('md4')" # NOTE: we trust ssl got md4 implementation right, # this is more to test our test is correct :) def setUp(self): super(MD4_SSL_Test, self).setUp() # make sure we're using right constructor. self.assertEqual(self.get_md4_const().__module__, "hashlib") class MD4_Builtin_Test(_Common_MD4_Test): descriptionPrefix = "passlib.crypto._md4.md4()" def setUp(self): super(MD4_Builtin_Test, self).setUp() if has_native_md4(): # Temporarily make lookup_hash() use builtin pure-python implementation, # by monkeypatching hashlib.new() to ensure we fall back to passlib's md4 class. orig = hashlib.new def wrapper(name, *args): if name == "md4": raise ValueError("md4 disabled for testing") return orig(name, *args) self.patchAttr(hashlib, "new", wrapper) # flush cache before & after test, since we're mucking with it. lookup_hash.clear_cache() self.addCleanup(lookup_hash.clear_cache) # make sure we're using right constructor. self.assertEqual(self.get_md4_const().__module__, "passlib.crypto._md4") #============================================================================= # eof #=============================================================================
Close