Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
imunify360
/
venv
/
lib64
/
python3.11
/
site-packages
/
imav
/
wordpress
/
__pycache__
[ HOME ]
Exec
Submit
File Name : site_repository.cpython-311.opt-1.pyc
� 3Ri[) � �� � d Z ddlZddlZddlZddlmZ ddlmZmZ ddl m Z ddlmZm Z ddlmZ ej e� � Z ed� � Zd ed ee fd�Zdej d ee fd �Zd ee fd�Zd ee fd�Zdee d dfd�Zded ee fd�Zdeded dfd�Z d"dee d ee fd�Z deded dfd�Z!d ee fd�Z"d� Z# e eddde#� � � ded e$fd!�� � Z%dS )#u 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> � N)�Path)�SqliteDatabase�OperationalError)�retry_on)�WPSite� WordpressSite)�PLUGIN_SLUGzD/var/lib/cloudlinux-app-version-detector/components_versions.sqlite3�path�returnc �< � t � � � s;t � dt t � � � � t � � S t t � � � d| � d�� � }d� |� � � D � � S )z� Get a list of WordPress sites that match the given path. Args: path: The path to search for WordPress sites. Returns: A list of WPSite objects that match the path. �-App detector database '%s' couldn't be found.ak WITH latest_reports AS ( SELECT id, uid, domain FROM report WHERE id IN ( SELECT MAX(id) FROM report WHERE domain IS NOT NULL AND domain != '' GROUP BY dir ) ) SELECT wp.real_path, lr.domain, lr.uid FROM apps AS wp INNER JOIN latest_reports AS lr ON wp.report_id = lr.id WHERE wp.title = 'wp_core' AND wp.parent_id IS NULL AND wp.real_path LIKE 'z%' c �p � g | ]3}t |d |d t |d � � �� � ��4S �r � � )�docroot�domain�uid�r �int��.0�rows �S/opt/imunify360/venv/lib/python3.11/site-packages/imav/wordpress/site_repository.py� <listcomp>z%get_sites_by_path.<locals>.<listcomp>N �I � � � � �� �s�1�v�c�!�f�#�c�!�f�+�+�>�>�>�� � � ) �COMPONENTS_DB_PATH�exists�logger�error�str�listr �execute_sql�fetchall)r �cursors r �get_sites_by_pathr'