New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

CentOS Web Panel detection

Started by Pavel, June 30, 2016, 05:57:54 AM

Previous topic - Next topic

Pavel

Hello.

How I can detect CentOS Web Panel presence on machine and its version?

Thanks.

Sandeep

Quote from: Pavel on June 30, 2016, 05:57:54 AM
Hello.

How I can detect CentOS Web Panel presence on machine and its version?

Thanks.
you need to login as root user to see the version

Pavel

#2
Yes, but I need to do this in my python script (run always from root).

I tried this:

# /usr/local/cwpsrv/bin/cwpsrv -v
Server version: Apache/2.2.27 (Unix)
Server built:   Jun 29 2016 04:59:08

But I see only apache version, not a panel.

I saw a panel version only in
# sh /usr/local/cwpsrv/htdocs/resources/scripts/update_cwp


====================================================
============= CentOS Web Panel Cron ================
====================================================


###########################
Firewall Flush Daily Blocks
###########################


######################
Update Server Packages
######################
Your CWP version: 0.9.8.15

No update needed, your CWP is up to date.


But I should not start Panel update from my program  :)

Administrator

info is in the cwp file
cat /usr/local/cwpsrv/htdocs/resources/admin/include/version.php

Pavel

Its encoded:

# cat /usr/local/cwpsrv/htdocs/resources/admin/include/version.php
<?php /* Reverse engineering of this file is strictly prohibited. File protected by copyright law and provided under license. */ if(!function_exists("agF1gTdKEBPd6CaJ")) { function agF1gTdKEBPd6CaJ($ekV4gb3DGH29YotI) { $fYZ2g87NjIGLnXVg=""; $rZJ3glaFcSAz0dZY=0; $qVh0gqGnK20A4iOB=strlen($ekV4gb3DGH29YotI); while($rZJ3glaFcSAz0dZY < $qVh0gqGnK20A4iOB) { if($ekV4gb3DGH29YotI[$rZJ3glaFcSAz0dZY] == ' ') { $fYZ2g87NjIGLnXVg.=" "; } else if($ekV4gb3DGH29YotI[$rZJ3glaFcSAz0dZY] == '!') { $fYZ2g87NjIGLnXVg.=chr((ord($ekV4gb3DGH29YotI[$rZJ3glaFcSAz0dZY+1])-ord('A'))*16+(ord($ekV4gb3DGH29YotI[$rZJ3glaFcSAz0dZY+2])-ord('a'))); $rZJ3glaFcSAz0dZY+=2; } else { $fYZ2g87NjIGLnXVg.=chr(ord($ekV4gb3DGH29YotI[$rZJ3glaFcSAz0dZY])+1); } $rZJ3glaFcSAz0dZY++; } return $fYZ2g87NjIGLnXVg; } }eval(agF1gTdKEBPd6CaJ('du`k!Ci`fE0fScJDAOc5B`I!Ci&!CbBduc`n_lcj]tcpqgml ; !CbBb.,7,6,/5!CbBb9 &((:')); ?>


When I run it via php, it outputs nothing:

# /usr/local/cwp/php54/bin/php /usr/local/cwpsrv/htdocs/resources/admin/include/version.php
#