ok

Mini Shell

Direktori : /proc/self/root/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/
Upload File :
Current File : //proc/self/root/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/universal.pyc

�
b=0Yc@s_dZyddlZWnek
r/dZnXddlmZddd�Zdd�ZdS(s>
api that is suitable for both cPanel, Directadmin, interWorx
i����N(t	NoPackagetmysqlc
	Cs�tstd��n|jdd�}|d}|d}tjd|d|d|d|�}|j�}d	}|r�|d
dj|�f7}n|d7}|j|�|j�}	|j�|	S(
s�
    Extracting database login control panel login pairs from mysql database
    supported for cPanel, interWorx, Directadmin
    :param dblogin:
    :param dbpass:
    :param dbhost:
    :param dbname:
    :param cplogin_lst:
    :return:
    s@Can not connect to database; MySQL-python package not installed.thostt	localhosttlogintpasstusertpasswdtdbsXSELECT User, LEFT(Db, LOCATE('\\', Db) - 1) FROM db WHERE User != '' and Db LIKE '%\\\%'s- and LEFT(Db, LOCATE('\\', Db) - 1) in ('%s')s', 's GROUP BY User(	tMySQLdbRtgettconnecttcursortjointexecutetfetchalltclose(
taccesstcplogin_lsttdbnametdbhosttdblogintdbpassRRtsqltdata((sD/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/universal.pyt_dblogin_cplogin_pairss

$


cCs ddl}d|p|j�S(s|
    Gets admin email
    :param str|None _hostname: hostname for testing
    :return: admin's email
    :rtype: string
    i����Nsroot@(tsockettgethostname(t	_hostnameR((sD/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/universal.pytget_admin_email+s(t__doc__R	tImportErrortNonetclcommon.cpapi.cpapiexceptionsRRR(((sD/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/universal.pyt<module>s



Zerion Mini Shell 1.0