403Webshell
Server IP : 134.236.49.22  /  Your IP : 216.73.216.114
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/lineLocal/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/lineLocal/Tx.php
<?php
/*
	เป็น PHP ให้เปิดฐานข้อมูล MIT/Report ค้นที่ต้องส่งเตือนข้อความ
	ที่ระบุใน message ไปถึง user ตามที่บันทึกไว้ในตาราง user 
	ส่วนท้ายเมื่อทำเสร็จก็จะ Refresh ตามเวลาที่กำหนด
	
*/
include ("config.php"); 
$curlurl = $link_URL."lpost.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
	<body>
<?php
	$mysqli = new mysqli($database_host, $database_username, $database_password, $database_name, $database_port);
	$mysqli->set_charset("utf8");
	$delay=600;  							//กำหนดเวลาให้วนลูปเป็นวินาที
	$Ret = 0;
	$nSend	=0;
	echo date("Y-m-d H:i:s").'  Refresh: '.$delay.' Sec.<br>';  						
	if ($mysqli->connect_error)  $Ret = -1;
	else {
		$Conn = $mysqli->query("SELECT  r.idno,r.userID,u.lineID,u.botID,r.message ,r.stkPID,r.stkID 
		from report r left join user u on r.userID=u.userID	where r.sended <> 'Y'");
		while($field = $Conn->fetch_array()){
			$Ret = $Ret +1;
			$reccord = $field['idno'];
			$params['BotID']	= $field['botID'];
			$params['LineID'] 	= $field['lineID'];
			$params['Msg']		= $field['message'];
			$params['Pid']		= $field['stkPID'];
			$params['Sid']		= $field['stkID'];
			echo $params['BotID'].' , '.$params['LineID'].' , '.$params['Pid'].' ,'.$params['Sid'].'<br>';
			$ch = curl_init();
			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
			curl_setopt($ch, CURLOPT_HEADER, 0);
			curl_setopt($ch, CURLOPT_POST,1); // method ที่เราจะส่ง เป็น get หรือ post
			curl_setopt($ch, CURLOPT_POSTFIELDS,$params); // paremeter สำหรับส่งไปยังไฟล์ ที่กำหนด
			curl_setopt($ch, CURLOPT_URL,$curlurl);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
			curl_setopt($ch, CURLOPT_TIMEOUT, 60);
			//curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
			$resp = curl_exec($ch); // ผลการ execute กลับมาเป็น ข้อมูลใน url ที่เรา ส่งคำร้องขอไป
			if(curl_errno($ch) !== 0) {
			   $resp ='CE';
			}
			curl_close ($ch);
			echo $resp.'<br>';
			$npos = strpos($resp,'<br>');
			if ($npos > 2)$Res = substr($resp,$npos-2,2);
			else $Res = 'CE';
			if ($Res=='OK'){
				$nSend=$nSend+1;
				$ConnR = $mysqli->query("Update report set sended = 'Y' where idno = $reccord ");
				mysqli_free_result($ConnR);	
			}
			
		}
		mysqli_free_result($Conn);
	}
	echo 'Number of Reccords: '.$Ret.' => '.$nSend.' Sended.';
	header("Refresh: $delay;"); 			
?>
</body>
</html>


Youez - 2016 - github.com/yon3zu
LinuXploit