§ ;Š»jÕ‘ãó—ddlZddlZddlZddlmcmZddlmZddl m Z ddl m Z ddl mZmZmZmZmZmZmZddlmZddlmZmZddlmZdd lmZmZdd lm Z m!Z!m"Z"m#Z#m$Z$dd l%m&Z&m'Z'm(Z(dd l)m*Z*dd l+m,Z,m-Z-m.Z.m/Z/dZ0hd£Z1e¦«Z2dZ3d„Z4e0fd„Z5d3d„Z6d4d„Z7d„Z8d„Z9d„Z:d„Z;d„Z< d5d„Z=d„Z>d „Z?d!„Z@d"„ZAd#„ZBeBd4d$„¦«ZCd6d%„ZDd4d&„ZEd7d'„ZFd8d(„ZGd)„ZHd*„ZId+„ZJd,„ZKd-„ZLd.eMd/eNfd0„ZOGd1„d2e'¦«ZPdS)9éN)Ú defaultdict©Úwraps)Ú format_exc)ÚAnyÚAnyStrÚDictÚListÚOptionalÚTupleÚUnion)Úurlparse)ÚClPwdÚ mysql_lib)Úuid_max)Ú"_docroot_under_user_via_custom_binÚget_domains_via_custom_binary)Ú DuplicateDataÚNoDomainÚ NoPackageÚ NoPanelUserÚ NotSupported)ÚDomainDescriptionÚGeneralPanelPluginV1ÚPHPDescription)ÚFeature)ÚExternalProgramFailedÚfind_module_param_in_configÚget_modules_dir_for_alt_phpÚ run_commandz/etc/psa/.psa.shadow>ÚdnsÚmailÚlocaleÚcploginÚpackageÚresellerÚPleskcó@—tj d¦«S)Nú/usr/local/psa/version)ÚosÚpathÚisfile©óúœ/builddir/build/BUILDROOT/alt-python27-cllib-3.4.44-1.el8.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/cpapi/plugins/plesk.pyÚdetectr0s€Ý Œ7�>Š>Ð2Ñ 3Ô 3Ð3r.cóº—i}d|d<t|dd¬¦«5}| ¦« ¦«|d<ddd¦«n #1swxYwY|S)NÚadminÚloginÚrúutf-8©ÚencodingÚpass)ÚopenÚreadÚstrip)Ú _pass_pathÚaccessÚfs r/Ú db_accessr?#s—€Ø €FØ€Fˆ7�OÝ ˆj˜#¨Ð 0Ñ 0Ô 0ð*°AØŸš™œŸšÑ)Ô)ˆˆv‰ð*ð*ð*ñ*ô*ð*ð*ð*ð*ð*ð*øøøð*ð*ð*ð*à €Msš*AÁAÁAÚpsaFc ó.—|p t¦«}| dd¦«}|d}|d}tj||||dd|¬¦«} |  ¦«5} |  ||¬¦«cd d d ¦«S#1swxYwYd S) a Return the result of a Plesk database query :param query: SQL query string with possible parameters :param data: arguments for the SQL parameter insertion :param _access: database authentication data :param _dbname: the name of the database :param as_dict: controls the format of the output data :type query: str :type _access: dict :type as_dict: bool :return: Tuple of rows according to the query in the format specified by as_dict :rtype: tuple(tuple) or tuple(dict) ÚhostÚ localhostr3r8TÚutf8)rBÚuserÚpasswdÚdbÚ use_unicodeÚcharsetÚas_dict)ÚargsN)r?ÚgetrÚMySQLConnectorÚconnectÚ execute_query) ÚqueryÚdataÚ_accessÚ_dbnamerJr=ÚdbhostÚdbloginÚdbpassÚ connectorrGs r/Ú query_sqlrX+sé€ð0Ð #� ™ œ €FØ �ZŠZ˜  Ñ ,Ô ,€FØ�WŒo€GØ �FŒ^€FÝÔ(¨f¸7È6Ø,3ÀÈvØ18ð:ñ:ô:€Ið × Ò Ñ Ô ð2 Ø×Ò ¨DÐÑ1Ô1ð2ð2ð2ð2ñ2ô2ð2ð2ð2ð2ð2ð2øøøð2ð2ð2ð2ð2ð2sÁ&B  BÂBcó:—d„td¬¦«D¦«}|S)Ncó—g|] }|d‘Œ S©rr-)Ú.0Ú fetched_ones r/ú zcpusers..Os€ÐQÐQÐQ k�;˜q”>ÐQÐQÐQr.)r$)Úkeyls©Úcpinfo)rRrSÚ cpusers_lsts r/ÚcpusersrcNs&€ØQÐQµVÀ-Ð5PÑ5PÔ5PÐQÑQÔQ€KØ Ðr.có8—d}d„t|¦«D¦«S)Nz?SELECT clients.login FROM clients WHERE clients.type='reseller'có—g|]\}|‘ŒSr-r-©r\r$s r/r^zresellers..Us€Ð 6Ð 6Ð 6™ ˜ˆGÐ 6Ð 6Ð 6r.©rX©Úsqls r/Ú resellersrjSs!€Ø K€CØ 6Ð 6¥y°¡~¤~Ð 6Ñ 6Ô 6Ð6r.cóR—d}td„t|¦«D¦«¦«S)Nz