REDROOM
PHP 8.3.30
Path:
Logout
Edit File
Size: 2.43 KB
Close
/opt/imunify360/venv/lib64/python3.11/site-packages/imav/malwarelib/utils/check_file.py
Text
Base64
""" This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see <https://www.imunify360.com/legal/eula> """ import re LOG_AND_MAIL_REGEX = ( r"/sess\_\w*$", r"/stat/usage\_\w+\.html", r"/stat/site\_\w+\.html", r"/webstat/awstats.*\.txt", r"/awstats/awstats.*\.txt", r"/awstats/.{1,80}\.pl", r"/awstats/.{1,80}\.html", r"/logs/error\_log\..*", r"/logs/xferlog\..*", r"/logs/access\_log\..*", r"/domlogs/.+", r"/logs/cron\..*", r"/logs/exceptions/.+\.log(?:\.\d)?(?:\.gz)?$", r"/mail(?:/[^/]+)*/[^,]+,S=[^,]+,W=.+", r"/mail(?:/[^/]+)*/[^,]+,S=.+", r"/mail(?:/[^/]+)*/storage/u\.[0-9]+", r"/mail(?:/[^/]+)*/storage/m\.[0-9]+", r"/Maildir(?:/[^/]+)*/[^,]+,S=[^,]+,W=.+", r"/Maildir(?:/[^/]+)*/[^,]+,S=.+", r"^/var/ossec/.*", ) IMUNIFY_LOG_REGEX = ( r"/var/log/imunify360/acronis-installer\.log$", r"/var/log/imunify360/console\.log(?:\.\d)?(?:\.gz)?$", r"/var/log/imunify360/debug\.log$", r"/var/log/imunify360/error\.log$", r"/var/log/install-mod\_remoteip\.log(?:\.\d{1.4})?(?:\.pid)?r$", r"/var/log/imunify360/malware\_scan\_\d{10}\.log$", r"/var/log/imunify360/network\.log$", r"/var/log/imunify360/process\_message\.log$", r"/var/log/imunify360-webshield/access.log(?:-\d{8})?(?:.gz)?$", r"/var/log/imunify360-webshield/error.log(?:-\d{8})?(?:.gz)?$", r"/.revisium_antivirus_cache/.revisium\d+/", r"/admin/plib/modules/revisium-antivirus/library/externals/", ) BYTES_TO_READ = 50 REGEX_IGNORE = [*map(re.compile, LOG_AND_MAIL_REGEX + IMUNIFY_LOG_REGEX)] def check_log_and_mail(data) -> bool: """ Check if file extension matches log file extension """ for regex_obj in REGEX_IGNORE: if regex_obj.search(data): return True return False
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2026-03-03 08:56:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
chattr.py
2.39 KB
lrw-r--r--
2026-01-23 13:55:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
check_file.py
2.43 KB
lrw-r--r--
2026-01-23 13:55:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
cloudways.py
2.50 KB
lrw-r--r--
2026-01-23 13:55:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
crontab.py
20.31 KB
lrw-r--r--
2026-01-23 13:55:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
endpoints.py
1.00 KB
lrw-r--r--
2026-01-23 13:55:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
malware_response.py
16.25 KB
lrw-r--r--
2026-01-23 13:55:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
revisium.py
4.17 KB
lrw-r--r--
2026-01-23 13:55:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
submit.py
2.10 KB
lrw-r--r--
2026-01-23 13:55:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
user_list.py
13.42 KB
lrw-r--r--
2026-01-23 13:55:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
2.03 KB
lrw-r--r--
2026-01-23 13:55:22
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).