[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: crontab-user-wrapper.py
File is not writable. Editing disabled.
#!/opt/cloudlinux/venv/bin/python3 -sbb # -*- coding: utf-8 -*- # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2025 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENCE.TXT # """ Crontab wrapper for website isolation support. This wrapper mimics crontab command-line interface: - crontab -l: Lists current crontab entries, filtering isolation tool prefixes - crontab [file]: Installs crontab from file (or '-' for stdin) When website isolation is active (PROXYEXEC_DOCUMENT_ROOT is set): 1. List operations filter out isolation wrapper prefixes from output 2. Save operations automatically prepend isolation tool to commands The isolation tool is prepended to commands to ensure they run within the isolated website context. """ import argparse import sys from clcagefslib.webisolation import crontab def create_parser(): """ Create argument parser for the crontab wrapper. Returns: argparse.ArgumentParser: Configured argument parser """ parser = argparse.ArgumentParser( prog="crontab-user-wrapper", description="Crontab wrapper for website isolation support. " "Filters and modifies crontab entries to support website isolation.", ) parser.add_argument( "-l", "--list", action="store_true", help="List current crontab entries (filters isolation prefixes)", dest="list_crontab", ) parser.add_argument( "file", nargs="?", default="-", help="File containing crontab entries to install, or '-' to read from stdin (default: '-')", ) return parser def main(argv=None): """ Main entry point. Args: argv: Command line arguments (defaults to sys.argv[1:]) Returns: int: Exit code """ parser = create_parser() args = parser.parse_args(argv) try: if args.list_crontab: return crontab.process_list() # Handle file argument: '-' means stdin, otherwise open the file if args.file == "-": stdin = sys.stdin.buffer else: try: stdin = open(args.file, "rb") except IOError as e: sys.stderr.write(f"crontab: error reading {args.file}: {e}\n") return 1 try: return crontab.process_save(stdin=stdin) finally: if args.file != "-" and stdin != sys.stdin.buffer: stdin.close() except Exception as e: # Surface any failure (e.g. forged PROXYEXEC_DOCUMENT_ROOT rejected # by get_document_root) as a clean stderr message instead of a # Python traceback leaking into the user's terminal. sys.stderr.write(f"crontab: {type(e).__name__}: {e}\n") return 1 if __name__ == "__main__": sys.exit(main())
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium264.web-hosting.com
Server IP: 69.57.162.13
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium264.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 73.59 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: kidscntx
User ID (UID): 1154
Group ID (GID): 1112
Script Owner UID: 1154
Current Dir Owner: N/A