!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.29 GB of 57.97 GB (22.92%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     class.GetSensord.php (1.78 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 GetSensordException extends Exception{}

/*
 * Main class
 */

class GetSensord {
    
    public function 
work() {
        
$temps $this->parseSysLog();
        return 
$temps;
    }

    private function 
parseSysLog() {

        
/*
         * For parsing the syslog looking for sensord entries
         * POTENTIALLY BUGGY -- only tested on debian/ubuntu flavored syslogs
         * Also slow as balls as it parses the entire syslog instead of
         * using something like tail
         */
        
$file '/var/log/syslog';
        if (!
is_file($file) || !is_readable($file)) {
            return array();
        }
        
$devices = array();
        foreach (
getLines($file) as $line) {
            if (
preg_match('/\w+\s*\d+ \d{2}:\d{2}:\d{2} \w+ sensord:\s*(.+):\s*(.+)/i'trim($line), $match) == 1) {
                
// Replace current record of dev with updated temp
                
$devices[$match[1]] = $match[2];
            }
        }
        
$return = array();
        foreach (
$devices as $dev => $stat)
            
$return[] = array(
                
'path' => 'N/A'// These likely won't have paths
                
'name' => $dev,
                
'temp' => $stat,
                
'unit' => '' // Usually included in above
            
);
        return 
$return;
    }
}

:: 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.0455 ]--