OXIESEC PANEL
- Current Dir:
/
/
snap
/
core24
/
888
/
usr
/
lib
/
python3.12
/
test
/
support
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/18/2025 08:12:15 AM
rwxr-xr-x
📄
__init__.py
78.13 KB
02/04/2025 02:48:35 PM
rw-r--r--
📁
__pycache__
-
03/18/2025 08:12:15 AM
rwxr-xr-x
📁
_hypothesis_stubs
-
03/18/2025 08:12:15 AM
rwxr-xr-x
📄
ast_helper.py
1.79 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
asynchat.py
11.33 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
asyncore.py
19.9 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
bytecode_helper.py
4.88 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
hashlib_helper.py
1.86 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
hypothesis_helper.py
1.35 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
import_helper.py
10.48 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
interpreters.py
5.67 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
logging_helper.py
916 bytes
02/04/2025 02:48:35 PM
rw-r--r--
📄
os_helper.py
23.72 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
pty_helper.py
2.98 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
script_helper.py
11.45 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
smtpd.py
30.01 KB
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
socket_helper.py
13.47 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
testcase.py
1.02 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
threading_helper.py
7.86 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
warnings_helper.py
6.69 KB
02/04/2025 02:48:35 PM
rw-r--r--
Editing: hashlib_helper.py
Close
import functools import hashlib import unittest try: import _hashlib except ImportError: _hashlib = None def requires_hashdigest(digestname, openssl=None, usedforsecurity=True): """Decorator raising SkipTest if a hashing algorithm is not available The hashing algorithm could be missing or blocked by a strict crypto policy. If 'openssl' is True, then the decorator checks that OpenSSL provides the algorithm. Otherwise the check falls back to built-in implementations. The usedforsecurity flag is passed to the constructor. ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS ValueError: unsupported hash type md4 """ def decorator(func_or_class): if isinstance(func_or_class, type): setUpClass = func_or_class.__dict__.get('setUpClass') if setUpClass is None: def setUpClass(cls): super(func_or_class, cls).setUpClass() setUpClass.__qualname__ = func_or_class.__qualname__ + '.setUpClass' setUpClass.__module__ = func_or_class.__module__ else: setUpClass = setUpClass.__func__ setUpClass = classmethod(decorator(setUpClass)) func_or_class.setUpClass = setUpClass return func_or_class @functools.wraps(func_or_class) def wrapper(*args, **kwargs): try: if openssl and _hashlib is not None: _hashlib.new(digestname, usedforsecurity=usedforsecurity) else: hashlib.new(digestname, usedforsecurity=usedforsecurity) except ValueError: raise unittest.SkipTest( f"hash digest '{digestname}' is not available." ) return func_or_class(*args, **kwargs) return wrapper return decorator