Control Web Panel

WebPanel => Information => Topic started by: Pavel on June 30, 2016, 05:57:54 AM

Title: CentOS Web Panel detection
Post by: Pavel on June 30, 2016, 05:57:54 AM
Hello.

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

Thanks.
Title: Re: CentOS Web Panel detection
Post by: Sandeep on June 30, 2016, 10:59:21 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
Title: Re: CentOS Web Panel detection
Post by: Pavel on June 30, 2016, 11:12:56 AM
Yes, but I need to do this in my python script (run always from root).

I tried this:

Code: [Select]
# /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
Code: [Select]
# 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  :)
Title: Re: CentOS Web Panel detection
Post by: Administrator on July 04, 2016, 11:56:20 AM
info is in the cwp file
Code: [Select]
cat /usr/local/cwpsrv/htdocs/resources/admin/include/version.php
Title: Re: CentOS Web Panel detection
Post by: Pavel on July 06, 2016, 07:20:44 AM
Its encoded:
Code: [Select]
# 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:
Code: [Select]
# /usr/local/cwp/php54/bin/php /usr/local/cwpsrv/htdocs/resources/admin/include/version.php
#