!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/billing/sysinfo/lib/   drwxr-xr-x
Free 13.26 GB of 57.97 GB (22.87%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     class.GetMbMon.php (1.98 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of Linfo (c) 2010 Joseph Gillotti.
 * 
 * Linfo is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Linfo is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Linfo.  If not, see <http://www.gnu.org/licenses/>.
 * 
*/


defined('IN_INFO') or exit;

/*
 * Exception
 */
class GetMbMonException extends Exception{}

/*
 * Deal with MbMon
 */
class GetMbMon {
    
// Store these
    
protected $host$port;

    
// Default socket connect timeout
    
const timeout 3;

    
// Localize host and port
    
public function setAddress($host$port 411) {
        
$this->host $host;
        
$this->port $port;
    }

    
// Connect to host/port and get info
    
private function getSock() {
        
// Try connecting
        
if (!($sock = @fsockopen($this->host$this->port$errno$errstrself::timeout)))
            throw new 
GetMbMonException('Error connecting');

        
// Try getting stuff
        
$buffer '';
        while (
$mid = @fgets($sock))
            
$buffer .= $mid;

        
// Quit
        
@fclose($sock);

        
// Output:
        
return $buffer;
    }

    
// Parse and return info from daemon socket
    
private function parseSockData($data) {

        
$return = array();

        
$lines = (array) explode("\n"trim($data));

        foreach (
$lines as $line) {
            if (
preg_match('/(\w+)\s*:\s*([-+]?[\d\.]+)/i'$line$match) == 1)
                
$return[] = array(
                    
'path' => 'N/A',
                    
'name' => $match[1],
                    
'temp' => $match[2],
                    
'unit' => '' // TODO
                
);
        }

        return 
$return;
    }

    
// Do work and return temps
    
public function work() {
        
$sockResult $this->getSock();
        
$temps $this->parseSockData($sockResult);
        return 
$temps;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0053 ]--