File manager - Edit - /opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/public_hooks/bundle/cpanel/bin/postsuspendacct
Back
#!/opt/cloudlinux/venv/bin/python3 -bb # -*- coding: utf-8 -*- # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2018 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT # import json import os import sys # Run as root via the cPanel hook dispatcher: harden interpreter path resolution # before importing clcommon so a caller-planted PYTHONPATH/cwd cannot hijack the # import. Keep only sys.path entries under the trusted interpreter/venv prefixes. os.environ.pop('PYTHONPATH', None) _trusted_prefixes = tuple( os.path.realpath(p) for p in {sys.prefix, sys.base_prefix, sys.exec_prefix, sys.base_exec_prefix} ) sys.path[:] = [ p for p in sys.path if p and os.path.realpath(p).startswith(_trusted_prefixes) ] from clcommon.public_hooks.bundle.cpanel.lib import ( cpanel_postsuspendacct_main, print_response ) from clcommon.public_hooks import setup_logger_and_sentry def main(): setup_logger_and_sentry() args = json.load(sys.stdin) exit_code = cpanel_postsuspendacct_main(args['data']) print_response(hook_name=__file__, success=exit_code == 0) exit(exit_code) if __name__ == '__main__': main()
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.05 |
proxy
|
phpinfo
|
Settings