uawdijnntqw1x1x1
IP : 3.142.200.252
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
..
/
lib
/
python2.7
/
site-packages
/
procfs
/
..
/
clcommon
/
clhook.pyc
/
/
� b=0Yc@s�ddlZddlZddlZddlZddlZdZdZdZdZ d�Z d�Zed�Zed �Z ed �Zd�ZdS(i����Ns/etc/sysconfig/cloudlinuxthookst;spython-cllib:clhook:cCs&tj�}t|_|j|�|S(s6 read config from file_name return config (tConfigParsertstrtoptionxformtread(t file_nametconfig((s3/usr/lib/python2.7/site-packages/clcommon/clhook.pyt get_configs cCs�yT|dttj��}t|d�}|j|�|j�tj||�Wn&tk r|t |t|�dgSXt dgS(sG write config to file_name return [BOOLEAN_STATE, MESSAGE] t.tws write error sOK (RtostgetpidtopentwritetclosetshutiltmovetIOErrortFalsetTrue(RRtdebug_local_namettmp_cfg_patht tmpconfig((s3/usr/lib/python2.7/site-packages/clcommon/clhook.pytwrite_configs cCsbg}t|�}y|jt|�jt�}Wn$tjtjfk rWt|gSXt |gS(s+ return [BOOLEAN_STATE, hook_list] ( RtgettHOOK_SECTIONtsplittHOOK_SEPARATORRt NoOptionErrortNoSectionErrorRR(thook_prefixtconfig_filet hook_listR((s3/usr/lib/python2.7/site-packages/clcommon/clhook.pytget_hook_list_from_file)scCs�td}t|�}yp|jt|�jt�}||kr\t|dt|�dgS|j|�|j t|tj |��WnZtjk r�|j t�|j t||�n'tjk r�|j t||�nXt|||�S(sE add hook to config file return [BOOLEAN_STATE, MESSAGE] sregister_hook:sHook s already registred (tDEBUG_STRINGRRRRRRRtappendtsettjoinRRtadd_sectionRR(t hook_pathRR RRR!((s3/usr/lib/python2.7/site-packages/clcommon/clhook.pyt register_hook5s cCs�td}g}t|�}yX|jt|�jt�}|j|�|jt|tj|��t |||�SWn't jt jt fk r�tdgSXdS(sJ remove hook from config_file return [BOOLEAN_STATE, MESSAGE] sunregister_hook:sOK N(R#RRRRRtremoveR%R&RRRRt ValueErrorR(R(RR RR!R((s3/usr/lib/python2.7/site-packages/clcommon/clhook.pytunregister_hookIs c Cs�td}tj|�}x�|D]�}tjj|�r�tj|tj�r�yHtj |dtj dtj dtj �}|jj|�|j �Wq�tk r�t|dgSXq t|t|�dgSq WtdgS(sY call hooks and send data as json to stdin return [BOOLEAN_STATUS, message] s call_hook:tstdintstdouttstderrsHook call error s : isn`t file or isn`t runnable sOK (R#tjsontdumpsRtpathtisfiletaccesstX_OKt subprocesstPopentPIPER-RtcommunicatetOSErrorRRR(R!tdataRtjson_encodethooktpipe((s3/usr/lib/python2.7/site-packages/clcommon/clhook.pytcall_hook_listYs '* (RRR6t simplejsonR0Rt CL_CONFIGRRR#RRR"R)R,R?(((s3/usr/lib/python2.7/site-packages/clcommon/clhook.pyt<module>s
/home/../lib/python2.7/site-packages/procfs/../clcommon/clhook.pyc