MINI Sh3ll
Path : /var/www/html/ |
|
Current File : /var/www/html/xiaomitest-response.php.22072022 |
<?php
header("Content-Type:text/plain");
$request = $_GET;
$mobileno = (isset($request['mobileno']))?$request['mobileno']:NULL;
$shortcode = (isset($request['shortcode']))?$request['shortcode']:NULL;
$message = (isset($request['message']))?$request['message']:NULL;
$network = (isset($request['network']))?$request['network']:NULL;
if($network == 'vodafone') {
while(strpos($message, '_XX/') !== false)
$message = str_replace('_XX/', '\\', $message);
while(strpos($message, '_XX') !== false)
$message = str_replace('_XX', '', $message);
$message = str_replace("\"", "\\\"", $message);
$message = str_replace("\\\\", "\\", $message);
}
else if($network == 'reliance-jio') {
while(strpos($message, 'Ö') !== false)
$message = str_replace('Ö', '\\', $message);
while(strpos($message, 'ä') !== false)
$message = str_replace('ä', '(', $message);
while(strpos($message, 'ñ') !== false)
$message = str_replace('ñ', ')', $message);
$message = str_replace("\"", "\\\"", $message);
}
//print_r($request); print_r($message); //die;
$curl = curl_init();
$postfields = [];
$postfields['msisdn'] = $mobileno;
$postfields['longcode'] = $shortcode;
$postfields['sms'] = $message;
$postfields['api-key'] = "5e31fc1a";
$curl_options = array(
CURLOPT_URL => 'https://in-connect.sms.intl.xiaomi.com/sms/callback/sms_callback',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
/*CURLOPT_POSTFIELDS =>'{
"msisdn":"'.$mobileno.'",
"longcode":"'.$shortcode.'",
"sms":"Xiaomitest MI-REG (\\"traceId\\":\\"airtel-st557571\\",\\"hashIccid\\":\\"111111\\",\\"opcode\\":1,\\"timestamp\\":1651049283034,\\"rptg\\":\\"(msg-content)\\")",
"api-key":"5e31fc1a"
}',*/
CURLOPT_POSTFIELDS =>'{
"msisdn":"'.$mobileno.'",
"longcode":"'.$shortcode.'",
"sms":"'.$message.'",
"api-key":"5e31fc1a"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
);
//print_r($curl_options);
curl_setopt_array($curl, $curl_options);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
OHA YOOOO