ACIL FM
Dark
Refresh
Current DIR:
/opt/imunify360/venv/bin
/
opt
imunify360
venv
bin
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
__pycache__
-
chmod
Open
Rename
Delete
activate
1.69 MB
chmod
View
DL
Edit
Rename
Delete
activate.csh
958 B
chmod
View
DL
Edit
Rename
Delete
activate.fish
2.18 MB
chmod
View
DL
Edit
Rename
Delete
Activate.ps1
8.82 MB
chmod
View
DL
Edit
Rename
Delete
distro
264 B
chmod
View
DL
Edit
Rename
Delete
docutils
275 B
chmod
View
DL
Edit
Rename
Delete
imunify360-command-wrapper
9.14 MB
chmod
View
DL
Edit
Rename
Delete
imunify360_pam.py
47.68 MB
chmod
View
DL
Edit
Rename
Delete
jsonschema
272 B
chmod
View
DL
Edit
Rename
Delete
normalizer
303 B
chmod
View
DL
Edit
Rename
Delete
pam_pureftpd_hook.py
2.15 MB
chmod
View
DL
Edit
Rename
Delete
pip
280 B
chmod
View
DL
Edit
Rename
Delete
pip3
280 B
chmod
View
DL
Edit
Rename
Delete
pip3.11
280 B
chmod
View
DL
Edit
Rename
Delete
pw-migrate
274 B
chmod
View
DL
Edit
Rename
Delete
pwiz.py
8.06 MB
chmod
View
DL
Edit
Rename
Delete
pw_migrate
274 B
chmod
View
DL
Edit
Rename
Delete
pybabel
281 B
chmod
View
DL
Edit
Rename
Delete
python
symlink
15.01 MB
chmod
View
DL
Edit
Rename
Delete
python3
symlink
15.01 MB
chmod
View
DL
Edit
Rename
Delete
python3.11
symlink
15.01 MB
chmod
View
DL
Edit
Rename
Delete
rst2html.py
661 B
chmod
View
DL
Edit
Rename
Delete
rst2html4.py
783 B
chmod
View
DL
Edit
Rename
Delete
rst2html5.py
1.09 MB
chmod
View
DL
Edit
Rename
Delete
rst2latex.py
860 B
chmod
View
DL
Edit
Rename
Delete
rst2man.py
683 B
chmod
View
DL
Edit
Rename
Delete
rst2odt.py
849 B
chmod
View
DL
Edit
Rename
Delete
rst2odt_prepstyles.py
655 B
chmod
View
DL
Edit
Rename
Delete
rst2pseudoxml.py
668 B
chmod
View
DL
Edit
Rename
Delete
rst2s5.py
704 B
chmod
View
DL
Edit
Rename
Delete
rst2xetex.py
940 B
chmod
View
DL
Edit
Rename
Delete
rst2xml.py
669 B
chmod
View
DL
Edit
Rename
Delete
rstpep2html.py
737 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /opt/imunify360/venv/bin/pam_pureftpd_hook.py
#!/opt/imunify360/venv/bin/python3 import argparse import os import re import subprocess from pam_i360.internals import logger_init PUREFTPD_CONFIG = "/etc/pure-ftpd.conf" CPANEL_CONFIG = "/var/cpanel/cpanel.config" IMUNIFY360_CONFIG = "/etc/sysconfig/imunify360/imunify360-merged.config" logger = logger_init() def is_pureftpd_enabled(): if not os.path.isfile(IMUNIFY360_CONFIG): return False ftp_protection = re.compile( rb"^(?!#).*ftp_protection:[^\S\r\n]*true", re.MULTILINE ) return ftp_protection.search( open(IMUNIFY360_CONFIG, "rb").read()) is not None def is_imunify360_pam_pureftpd_enabled(): imunify360_sock = re.compile( rb"^(?!#).*\/var\/run\/ftpd.imunify360.sock", re.MULTILINE ) return imunify360_sock.search( open(PUREFTPD_CONFIG, "rb").read()) is not None def enable_pureftpd(no_restart=False, timeout=60): cmd = [ "/usr/sbin/imunify360-pam", "enable-pureftpd", ] if no_restart: cmd.append("--no-restart-pureftpd") try: return subprocess.run(cmd, timeout=timeout, check=True) except subprocess.TimeoutExpired as e: return subprocess.CompletedProcess( e.cmd, returncode=None, stdout=e.stdout, stderr=e.stderr ) def main(): parser = argparse.ArgumentParser() parser.add_argument( "-n", "--no-restart", dest="norestart", action="store_true", help="Don't restart pureftpd", ) args = parser.parse_args() no_restart = args.norestart with open(CPANEL_CONFIG, "r") as cpcfg: data = cpcfg.read() if not "ftpserver=pure-ftpd" in data: return if not os.path.isfile(PUREFTPD_CONFIG): return imunify360_pam_pureftpd_enabled = is_imunify360_pam_pureftpd_enabled() pureftpd_enabled = is_pureftpd_enabled() if pureftpd_enabled and not imunify360_pam_pureftpd_enabled: enable_pureftpd(no_restart, timeout=60) if __name__ == "__main__": try: main() except Exception as e: logger.error("failed to check and enable pure-ftpd: %s", e)
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply