Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
- *
- * @ Version : 1.1.3.0
- * @ Author : DeZender
- * @ Release on : 17.05.2011
- * @ Official site : http://DeZender.Net
- *
- */
- class IntroAction extends CommonAction {
- function index() {
- $this->data['aName'] = $this->data['global']['software_name_short'] . '首页';
- $this->data['introduction'] = file_get_contents( APP_PATH . 'introduction.html' );
- $this->data['license'] = file_get_contents( APP_PATH . 'license.html' );
- if ($this->data['auth']['Payments'] != -1) {
- $this->data['balance'] = $this->find( array( 'module_name' => 'Users', 'where' => array( 'id' => $_SESSION['user_info']['uid'] ), 'field' => 'balance' ) );
- } else {
- $this->data['balance'] = 0;
- }
- $this->data['os'] = os_info( );
- $this->data['server_name'] = trim( shell_exec( 'uname -n' ) );
- $this->data['free_space_home'] = byte_format( ai_disk_free_space( (DIRECTORY_SEPARATOR == '/' ? c( 'FTP_ROOT' ) : './') ) );
- $this->data['free_space_var'] = byte_format( ai_disk_free_space( (DIRECTORY_SEPARATOR == '/' ? '/var' : './') ) );
- $this->data['new_nginx_log_size'] = byte_format( $this->bdjahdcgce( c( 'HOSTS_LOG_ROOT' ) ) );
- $this->data['client_ip'] = get_client_ip( );
- if (isset( $_GET['hardware_test_int'] )) {
- $cdecjgbhh['test']['int'] = $this->deehcfjibg( );
- f( 'hardware_test_int', $cdecjgbhh['test']['int'] );
- } else {
- if (f( 'hardware_test_int' )) {
- $cdecjgbhh['test']['int'] = f( 'hardware_test_int' );
- }
- }
- if (isset( $_GET['hardware_test_float'] )) {
- $cdecjgbhh['test']['float'] = $this->dhhcfeaech( );
- f( 'hardware_test_float', $cdecjgbhh['test']['float'] );
- } else {
- if (f( 'hardware_test_float' )) {
- $cdecjgbhh['test']['float'] = f( 'hardware_test_float' );
- }
- }
- if (isset( $_GET['hardware_test_read'] )) {
- $cdecjgbhh['test']['read'] = $this->bdhcjbhhia( );
- f( 'hardware_test_read', $cdecjgbhh['test']['read'] );
- } else {
- if (f( 'hardware_test_read' )) {
- $cdecjgbhh['test']['read'] = f( 'hardware_test_read' );
- }
- }
- if (isset( $_GET['hardware_test_write'] )) {
- $cdecjgbhh['test']['write'] = $this->cgdadfcggf( );
- f( 'hardware_test_write', $cdecjgbhh['test']['write'] );
- } else {
- if (f( 'hardware_test_write' )) {
- $cdecjgbhh['test']['write'] = f( 'hardware_test_write' );
- }
- }
- $this->data['hardware_test'] = $cdecjgbhh['test'];
- $ciacdjfcgi = ai_ps( 'apache/bin|nginx|mysqld_safe|pure-ftpd|php-cgi|sshd|named|apache_LuManager/bin' );
- $this->data['apache_status'] = stristr( $ciacdjfcgi, 'apache/bin' );
- $this->data['apache_status'] = substr_count( $ciacdjfcgi, 'apache/bin' );
- $this->data['apache_vhosts'] = substr_count( file_get_contents( '/usr/local/apache/conf/vhost.conf' ), '</VirtualHost>' );
- $this->data['nginx_status'] = substr_count( $ciacdjfcgi, 'nginx' );
- $this->data['mysql_status'] = substr_count( $ciacdjfcgi, 'mysqld_safe' );
- if (!( $this->data['mysql_status'])) {
- $this->data['mysql_status'] = 1;
- }
- $this->data['pureftpd_status'] = substr_count( $ciacdjfcgi, 'pure-ftpd' );
- if (!( $this->data['pureftpd_status'])) {
- $this->data['ftp_count'] = $this->count( array( 'module_name' => 'Ftps' ) );
- }
- $this->data['php_cgi_status'] = substr_count( $ciacdjfcgi, 'php-cgi' );
- $this->data['sshd_status'] = substr_count( $ciacdjfcgi, 'sshd' );
- $this->data['bind_status'] = substr_count( $ciacdjfcgi, 'named' );
- $this->data['dns_count'] = $this->count( array( 'module_name' => 'Dnss' ) );
- $this->data['lum_status'] = substr_count( $ciacdjfcgi, 'apache_LuManager/bin' );
- $caffjbciij = preg_replace( '#\s+#s', ' ', shell_exec( 'df -h' ) );
- $caffjbciij = substr( $caffjbciij, strpos( $caffjbciij, '/dev/' ) );
- $bjgeifdjch = explode( ' ', $caffjbciij );
- foreach ($bjgeifdjch as $djggfdjigc => $cajecdhbch) {
- if ($djggfdjigc) {
- if ($djggfdjigc % 6 == 0) {
- $bjgeifdjch->$djggfdjigc - 1 .= '
- ';
- continue;
- }
- continue;
- }
- }
- $caffjbciij = join( ' ', $bjgeifdjch );
- $caffjbciij = preg_replace( '#^\s+#m', '', $caffjbciij );
- preg_match_all( '#^/dev/.+$#Um', $caffjbciij, $ebijcihc );
- $fbecfhagj = array( );
- foreach ($ebijcihc[0] as $djggfdjigc => $cajecdhbch) {
- $cajecdhbch = trim( $cajecdhbch );
- $cajecdhbch = preg_replace( '#\s+#', ' ', $cajecdhbch );
- if ($cajecdhbch) {
- $dgggjeaieg = explode( ' ', $cajecdhbch );
- $dgggjeaieg = ai_trim( $dgggjeaieg );
- $fbecfhagj[$djggfdjigc] = $dgggjeaieg;
- continue;
- }
- }
- $this->data['df'] = $fbecfhagj;
- $this->data['hardware'] = hardware( );
- $cgahfceadc = m( 'Logs' );
- $dhhgifceif = $cgahfceadc->where( array( 'uid' => $_SESSION['user_info']['uid'] ) )->count( );
- if (!( c( 'IS_DEMO' ))) {
- if (86400 < $this->data['timestamp'] - $_SESSION['user_info']['dateline']) {
- if (!( is_file( SAFE_ROOT . 'safe_passwords/' . $_SESSION['user_info']['uid'] . '.key' ))) {
- if (!( ( !( 50 < $dhhgifceif ) && !( 3 <= substr_count( file_get_contents( '/usr/local/nginx/conf/vhost.conf' ), 'Welcome to our website!' ) ) ))) {
- $this->difadjjifd( '为了保证数据安全,必须设置保护密码。正跳转至设置页面...', u( 'Safes/index' ) . '#safe_password_tr', 5 );
- }
- }
- }
- }
- if (f( 'soft_ver' ) == null) {
- $dacacbfdgh = $this->ifcjfchcd( '/usr/local/mysql/bin/mysqladmin --version' );
- preg_match( '#(\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
- $cehgbjicea['mysql'] = $ebijcihc[1];
- $dacacbfdgh = $this->ifcjfchcd( '/usr/local/nginx/sbin/nginx -v ' . basic_output_suf( ) );
- preg_match( '#nginx/(\d+\.\d+\.\d+)#si', $dacacbfdgh, $ebijcihc );
- $cehgbjicea['nginx'] = $ebijcihc[1];
- if (stristr( $dacacbfdgh, 'tengine' )) {
- preg_match( '#Tengine/(\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
- $cehgbjicea['tengine'] = $ebijcihc[1];
- }
- $dacacbfdgh = $this->ifcjfchcd( '/usr/local/apache/bin/apachectl -v ' . basic_output_suf( ) );
- preg_match( '#(\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
- $cehgbjicea['apache'] = $ebijcihc[1];
- $dacacbfdgh = $this->ifcjfchcd( '/usr/local/php_fcgi/bin/php -v ' . basic_output_suf( ) );
- preg_match( '#PHP (\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
- $cehgbjicea['php_fcgi'] = $ebijcihc[1];
- preg_match( '#(Zend Optimizer|Zend Guard Loader)(.+v\d+.+), Copyright#Us', $dacacbfdgh, $cffchcjjcj );
- $cehgbjicea['zend_fcgi'] = $cffchcjjcj[1] . $cffchcjjcj[2];
- $dacacbfdgh = $this->ifcjfchcd( '/usr/local/php/bin/php -v ' . basic_output_suf( ) );
- preg_match( '#PHP (\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
- $cehgbjicea['php'] = $ebijcihc[1];
- preg_match( '#(Zend Optimizer|Zend Guard Loader)(.+v\d+.+), Copyright#Us', $dacacbfdgh, $cffchcjjcj );
- $cehgbjicea['zend'] = $cffchcjjcj[1] . $cffchcjjcj[2];
- preg_match( '#eAccelerator v(\d+\.\d+\.\d+\.\d+)#s', $dacacbfdgh, $ddggddiceh );
- $cehgbjicea['eAccelerator'] = $ddggddiceh[1];
- $dacacbfdgh = $this->ifcjfchcd( '/usr/local/pureftpd/sbin/pure-ftpd --help ' . basic_output_suf( ) );
- preg_match( '#(\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
- $cehgbjicea['pureftpd'] = $ebijcihc[1];
- if (PHP_OS == 'Linux') {
- $dacacbfdgh = $this->ifcjfchcd( 'cat /etc/issue' );
- } else {
- $dacacbfdgh = shell_exec( 'uname -r' );
- }
- preg_match( '#(\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
- $cehgbjicea['os'] = $ebijcihc[1];
- f( 'soft_ver', $cehgbjicea );
- $this->data['soft_ver'] = $cehgbjicea;
- } else {
- $this->data['soft_ver'] = f( 'soft_ver' );
- }
- $_SESSION['mysql_ver'] = $this->data['soft_ver']['mysql'];
- if (!( c( 'IS_DEMO' ))) {
- if ($_SESSION['user_info']['sys_admin']) {
- if (!( isset( $_SESSION['lu_ad_contents'] ))) {
- $chhdhfbfah = curl_file_get_contents( $this->data['global']['down_url'] . '/lum_Intro_index_ad.zip', 3 );
- $djcgibcbd = explode( '
- ', $chhdhfbfah );
- if ($djcgibcbd) {
- foreach ($djcgibcbd as $djggfdjigc => $cajecdhbch) {
- if (trim( $cajecdhbch )) {
- $djcgibcbd[$djggfdjigc] = '<li>' . h( $cajecdhbch ) . '</li>';
- continue;
- }
- }
- $chhdhfbfah = '<ul>' . join( '
- ', $djcgibcbd ) . '</ul>';
- }
- if (stristr( $chhdhfbfah, '<ul><li>' )) {
- $this->data['lu_ad_contents'] = $chhdhfbfah;
- $_SESSION['lu_ad_contents'] = ;
- }
- } else {
- $this->data['lu_ad_contents'] = $_SESSION['lu_ad_contents'];
- }
- }
- } else {
- $this->data['lu_ad_contents'] = '';
- }
- if (!( ( ( !( PGSQL_DB_PWD == 'zijidelu' ) && !( MYSQL_DB_PWD == 'zijidelu' ) ) && !( $_SESSION['password'] == 'dd8eb031789b6a0664709455e7d512ce' ) ))) {
- if (!( ai_cookie( 'change_db_password' ))) {
- ai_cookie( 'change_db_password', 1 );
- $this->data['please_change_password'] = 1;
- }
- } else {
- $this->data['please_change_password'] = 0;
- }
- if ($_SESSION['user_info']['sys_admin']) {
- if (abs( time( ) - $this->data['global']['first_runtime'] ) <= 86400) {
- $this->data['show_prompt'] = 1;
- }
- }
- if (is_file( LUM_ROOT . DATA_PATH . 'try_lum.lock' )) {
- $this->data['try_lum_ing'] = 1;
- } else {
- $this->data['try_lum_ing'] = 0;
- }
- if ($_SESSION['user_pro_count']) {
- $this->data['user_pro_count'] = $_SESSION['user_pro_count'];
- } else {
- $this->data['user_pro_count'] = array( );
- $ccicebgdcg = $this->dhaghcihji( );
- $this->data['user_pro_count']['Solutions'] = ($ccicebgdcg == 0 ? 0 : count( $ccicebgdcg ));
- $ecfheijaij = array( 'Hosts', 'Ftps', 'Mysqls', 'Zones', 'Orders' );
- foreach ($ecfheijaij as $djggfdjigc => $cajecdhbch) {
- if (!( null == $cajecdhbch)) {
- $this->data['user_pro_count'][$cajecdhbch] = $this->count( array( 'module_name' => $cajecdhbch, 'where' => array( 'uid' => $_SESSION['user_info']['uid'] ) ) );
- $this->data['user_pro_count'][$cajecdhbch . '_active'] = $this->count( array( 'module_name' => $cajecdhbch, 'where' => array( 'uid' => $_SESSION['user_info']['uid'], 'status' => 1 ) ) );
- continue;
- }
- }
- $_SESSION['user_pro_count'] = $this->data['user_pro_count'];
- ( !LU_DEBUG && );
- }
- $this->output( );
- }
- function p%njn)inf() {
- sleep( 1 );
- $bbdjacjidi = microtime( true );
- for ($diadgeibaa = 0; $diadgeibaa < 10000000; ++$diadgeibaa) {
- $dbgbafhgec = 2;
- }
- $eaghjggehd = microtime( true );
- $bahaaeaihi = $eaghjggehd - $bbdjacjidi;
- $cejbfdgeih = round( 3.5 / $bahaaeaihi, 2 );
- if ($cejbfdgeih < 0.1) {
- $cejbfdgeih = 0.1;
- } else {
- if (9.90000000000000035527137 < $cejbfdgeih) {
- $cejbfdgeih = 9.90000000000000035527137;
- }
- }
- return array( 'score' => $cejbfdgeih, 'time' => $bahaaeaihi );
- }
- function ,aee.
- }a() {
- sleep( 1 );
- $dbgbafhgec = pi( );
- $bbdjacjidi = microtime( true );
- for ($diadgeibaa = 0; $diadgeibaa < 10000000; ++$diadgeibaa) {
- sqrt( $dbgbafhgec );
- }
- $eaghjggehd = microtime( true );
- $bahaaeaihi = $eaghjggehd - $bbdjacjidi;
- $cejbfdgeih = round( 8 / $bahaaeaihi, 2 );
- if ($cejbfdgeih < 0.1) {
- $cejbfdgeih = 0.1;
- } else {
- if (9.90000000000000035527137 < $cejbfdgeih) {
- $cejbfdgeih = 9.90000000000000035527137;
- }
- }
- return array( 'score' => $cejbfdgeih, 'time' => $bahaaeaihi );
- }
- function b=dwtp() {
- sleep( 1 );
- $bbdjacjidi = microtime( true );
- for ($diadgeibaa = 0; $diadgeibaa < 40000; ++$diadgeibaa) {
- clearstatcache( );
- file_get_contents( CONFIG_PATH . 'config.php' );
- }
- $eaghjggehd = microtime( true );
- fclose( $dfafeebiab );
- $bahaaeaihi = $eaghjggehd - $bbdjacjidi;
- $cejbfdgeih = round( 3 / $bahaaeaihi, 2 );
- if ($cejbfdgeih < 0.1) {
- $cejbfdgeih = 0.1;
- } else {
- if (9.90000000000000035527137 < $cejbfdgeih) {
- $cejbfdgeih = 9.90000000000000035527137;
- }
- }
- return array( 'score' => $cejbfdgeih, 'time' => $bahaaeaihi );
- }
- function q1fp9qntus,() {
- sleep( 1 );
- $bbdjacjidi = microtime( true );
- for ($diadgeibaa = 0; $diadgeibaa < 12000; ++$diadgeibaa) {
- clearstatcache( );
- file_put_contents( '/tmp/test_write.txt', 'test_write' . $diadgeibaa );
- }
- $eaghjggehd = microtime( true );
- fclose( $dfafeebiab );
- $bahaaeaihi = $eaghjggehd - $bbdjacjidi;
- $cejbfdgeih = round( 1.5 / $bahaaeaihi, 2 );
- if ($cejbfdgeih < 0.1) {
- $cejbfdgeih = 0.1;
- } else {
- if (9.90000000000000035527137 < $cejbfdgeih) {
- $cejbfdgeih = 9.90000000000000035527137;
- }
- }
- return array( 'score' => $cejbfdgeih, 'time' => $bahaaeaihi );
- }
- function lum_update_public() {
- if ($_POST['lum_update_check'] == 1) {
- $this->djffaijfgi( 1 );
- return null;
- }
- $this->djffaijfgi( );
- }
- function cancel_try_lum() {
- if (unlink( LUM_ROOT . DATA_PATH . 'try_lum.lock' )) {
- $this->success( '取消试用成功' );
- return null;
- }
- $this->error( '取消试用失败' );
- }
- function try_lum() {
- $djdehdihag = $this->count( array( 'module_name' => 'Hosts' ) );
- if (5 < $djdehdihag) {
- $this->error( '网站数量少于5个才可以试用API功能' );
- }
- $djdehdihag = $this->count( array( 'module_name' => 'Ftps' ) );
- if (5 < $djdehdihag) {
- $this->error( 'FTP数量少于5个才可以试用API功能' );
- }
- $djdehdihag = $this->count( array( 'module_name' => 'Hosts' ) );
- if (5 < $djdehdihag) {
- $this->error( 'MySQL数量少于5个才可以试用API功能' );
- }
- if (file_put_contents( LUM_ROOT . DATA_PATH . 'try_lum.lock', '1' )) {
- $this->ebjdggijii( array( 'msg' => '开启试用成功', 'log' => 'msg' ) );
- return null;
- }
- $this->ebjdggijii( array( 'msg' => '开启试用失败' ) );
- }
- function hecixaz;($dhfeddihhi = 0) {
- if (!( $this->data['global']['down_url'])) {
- $bhijjcciec = array( );
- $bhijjcciec[] = '不能连接官方下载服务器,请清空缓存后再试,如果还是不行,大致有以下3个原因::';
- $bhijjcciec[] = '1. 您的服务器不能连接外网';
- $bhijjcciec[] = '2. 官方服务器暂时失效';
- $bhijjcciec[] = '3. 您的服务器NS服务器(nameserver)设置错误,请检查/etc/resolv.conf文件!';
- $this->error( join( '<p>', $bhijjcciec ) );
- }
- $ieeabijhe = $this->cfaifbdjej( $this->data['global']['down_url'] . '/update_list2.0.X.zip' );
- if (!( $ieeabijhe)) {
- $this->error( '校验文件下载失败或者格式错误' );
- }
- if (!( stristr( $ieeabijhe, a_b_c( c( 'SOFTWARE_VERSION' ), ' ' ) ))) {
- $this->error( '当前版本不能使用在线升级功能,升级失败' );
- }
- $bgbcffgcjd = explode( '
- ', $ieeabijhe );
- if ($dhfeddihhi == 1) {
- foreach ($bgbcffgcjd as $cajecdhbch) {
- $bagjbicbcf = explode( '---', $cajecdhbch );
- $bagjbicbcf = ai_trim( $bagjbicbcf );
- if (c( 'SOFTWARE_VERSION' ) < trim( $bagjbicbcf[3] )) {
- if (!( stristr( $bagjbicbcf[2], 'allow' ))) {
- $this->error( '下一版本:LuManager ' . $bagjbicbcf[3] . ',但该版本不允许在线升级,请使用ssh进行升级!' );
- }
- $bhijjcciec = array( );
- $bhijjcciec[] = '存在可用更新:LuManager ' . $bagjbicbcf[3] . ' ';
- $this->success( join( '<p>', $bhijjcciec ) );
- continue;
- }
- }
- $this->error( '暂无更新,多谢关注!' );
- }
- $badhfdefbb = 0;
- foreach ($bgbcffgcjd as $cajecdhbch) {
- if ($badhfdefbb == 1) {
- $bagjbicbcf = explode( '---', $cajecdhbch );
- $bagjbicbcf = ai_trim( $bagjbicbcf );
- if (stristr( $cajecdhbch, 'allow' )) {
- $bgaeedjjia = $this->ifcjfchcd( os_cmd( 'curl' ) . ' -I ' . $this->data['global']['down_url'] . '/lum' . $bagjbicbcf[3] . '/LuManager_last.tar.gz' );
- if (!( stristr( $bgaeedjjia, '200 OK' ))) {
- $this->error( '无法连接官方服务器或者升级文件不存在,请稍候再试' );
- }
- $dggfdciiab = array( );
- $dggfdciiab[] = 'cd /home/lum_tmp_files/';
- $dggfdciiab[] = 'rm -rf /home/lum_tmp_files/LuManager_last.tar.gz /home/lum_tmp_files/LuManager';
- $dggfdciiab[] = os_cmd( 'wget' ) . $this->data['global']['down_url'] . '/lum' . $bagjbicbcf[3] . '/LuManager_last.tar.gz';
- $dggfdciiab[] = 'tar -zxf LuManager_last.tar.gz';
- $this->ifcjfchcd( $dggfdciiab );
- if (!( is_file( '/home/lum_tmp_files/LuManager_last.tar.gz' ))) {
- $this->error( '升级文件下载失败,请稍候再试' );
- }
- if (!( stristr( md5_file( '/home/lum_tmp_files/LuManager_last.tar.gz' ) . sha1_file( '/home/lum_tmp_files/LuManager_last.tar.gz' ), trim( $bagjbicbcf[0] ) ))) {
- $this->error( '升级文件指纹校验错误,请暂时不要升级!' );
- }
- if (!( is_dir( '/home/lum_tmp_files/LuManager' ))) {
- $this->error( $dggfdciiab . '升级文件解压失败,可能是下载不完整,请稍候再试' );
- }
- $this->ifcjfchcd( 'chmod -R 700 /home/lum_tmp_files/LuManager*' );
- $this->ifcjfchcd( 'chown -R LuManager:LuManager /home/lum_tmp_files/LuManager*' );
- $dggfdciiab = array( );
- $cbdjghjif = '/home/hosts_backup/LuManager' . c( 'SOFTWARE_VERSION' ) . '/' . date( 'Y-m-d_H-i:s' ) . '/';
- $dggfdciiab[] = 'mkdir -p ' . $cbdjghjif;
- $dggfdciiab[] = 'cp -R ' . LUM_ROOT . '* ' . $cbdjghjif;
- $dggfdciiab[] = 'rm -rf ' . LUM_ROOT . '*';
- $dggfdciiab[] = 'cp -R /home/lum_tmp_files/LuManager/* ' . LUM_ROOT;
- $dggfdciiab[] = CMD_ROOT . 'lu-repair';
- $this->ifcjfchcd( $dggfdciiab );
- if (stristr( file_get_contents( LUM_ROOT . 'Conf/config.php' ), $bagjbicbcf[3] )) {
- $bhijjcciec = '升级至LuManager ' . $bagjbicbcf[3] . '成功,请刷新并重新登陆!';
- $this->dabhjghhch( $bhijjcciec );
- $this->success( $bhijjcciec );
- } else {
- $this->ifcjfchcd( 'cp -R ' . $cbdjghjif . './* ' . LUM_ROOT );
- $bhijjcciec = '升级至LuManager ' . $bagjbicbcf[3] . '失败,请使用zijidelu_update.sh升级';
- $this->dabhjghhch( $bhijjcciec );
- $this->success( $bhijjcciec );
- }
- } else {
- $this->error( '下一版本:LuManager ' . $bagjbicbcf[3] . ',但该版本不允许在线升级,请使用ssh进行升级!' );
- }
- }
- if (stristr( $cajecdhbch, c( 'SOFTWARE_VERSION' ) )) {
- $badhfdefbb = 1;
- continue;
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement