403Webshell
Server IP : 123.56.80.60  /  Your IP : 216.73.216.78
Web Server : Apache/2.4.54 (Win32) OpenSSL/1.1.1s PHP/7.4.33 mod_fcgid/2.3.10-dev
System : Windows NT iZhx3sob14hnz7Z 10.0 build 14393 (Windows Server 2016) i586
User : SYSTEM ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/wamp/apps/phpsysinfo3.4.2/includes/mb/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/wamp/apps/phpsysinfo3.4.2/includes/mb/class.speedfan.inc.php
<?php
/**
 * speedfan sensor class, getting hardware information through SpeedFanGet
 *
 * PHP version 5
 *
 * @category  PHP
 * @package   PSI_Sensor
 * @author    Mieczyslaw Nalewaj <namiltd@users.sourceforge.net>
 * @copyright 2016 phpSysInfo
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
 * @version   Release: 3.0
 * @link      http://phpsysinfo.sourceforge.net
 */
class SpeedFan extends Sensors
{
    /*
     * variable, which holds the content of the command
     * @var array
     */
    private $_filecontent = array();

    public function __construct()
    {
        parent::__construct();
        if ((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) switch (defined('PSI_SENSOR_SPEEDFAN_ACCESS')?strtolower(PSI_SENSOR_SPEEDFAN_ACCESS):'command') {
        case 'command':
            if (CommonFunctions::executeProgram("SpeedFanGet.exe", "", $buffer, PSI_DEBUG) && (strlen($buffer) > 0)) {
                if (preg_match("/^Temperatures:\s+(.+)$/m", $buffer, $out)) {
                    $this->_filecontent["temp"] = $out[1];
                }
                if (preg_match("/^Fans:\s+(.+)$/m", $buffer, $out)) {
                    $this->_filecontent["fans"] = $out[1];
                }
                if (preg_match("/^Voltages:\s+(.+)$/m", $buffer, $out)) {
                    $this->_filecontent["volt"] = $out[1];
                }
            }
            break;
        case 'data':
            if (CommonFunctions::rftsdata('speedfan.tmp', $buffer) && (strlen($buffer) > 0)) {
                if (preg_match("/^Temperatures:\s+(.+)$/m", $buffer, $out)) {
                    $this->_filecontent["temp"] = $out[1];
                }
                if (preg_match("/^Fans:\s+(.+)$/m", $buffer, $out)) {
                    $this->_filecontent["fans"] = $out[1];
                }
                if (preg_match("/^Voltages:\s+(.+)$/m", $buffer, $out)) {
                    $this->_filecontent["volt"] = $out[1];
                }
            }
            break;
        default:
            $this->error->addConfigError('__construct()', '[sensor_speedfan] ACCESS');
        }
    }

    /**
     * get temperature information
     *
     * @return void
     */
    private function _temperature()
    {
        if (isset($this->_filecontent["temp"]) && (trim($this->_filecontent["temp"]) !== "")) {
            $values = preg_split("/ /", trim($this->_filecontent["temp"]));
            foreach ($values as $id=>$value) {
                $dev = new SensorDevice();
                $dev->setName("temp".$id);
                $dev->setValue($value);
                $this->mbinfo->setMbTemp($dev);
            }
        }
    }

    /**
     * get fan information
     *
     * @return void
     */
    private function _fans()
    {
        if (isset($this->_filecontent["fans"]) && (trim($this->_filecontent["fans"]) !== "")) {
            $values = preg_split("/ /", trim($this->_filecontent["fans"]));
            foreach ($values as $id=>$value) {
                $dev = new SensorDevice();
                $dev->setName("fan".$id);
                $dev->setValue($value);
                $this->mbinfo->setMbFan($dev);
            }
        }
    }

    /**
     * get voltage information
     *
     * @return void
     */
    private function _voltage()
    {
        if (isset($this->_filecontent["volt"]) && (trim($this->_filecontent["volt"]) !== "")) {
            $values = preg_split("/ /", trim($this->_filecontent["volt"]));
            foreach ($values as $id=>$value) {
                $dev = new SensorDevice();
                $dev->setName("in".$id);
                $dev->setValue($value);
                $this->mbinfo->setMbVolt($dev);
            }
        }
    }

    /**
     * get the information
     *
     * @see PSI_Interface_Sensor::build()
     *
     * @return void
     */
    public function build()
    {
        $this->_temperature();
        $this->_fans();
        $this->_voltage();
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit