Exemple #1
0
 function GetTicket()
 {
     $numbers = array();
     $e = 0;
     while ($e < 6) {
         $i = rand(0, 100);
         if (Ar::SomeKeyIs($numbers, $i)) {
             $numbers[$i]++;
         } else {
             $numbers[$i] = 1;
         }
         $e++;
     }
     $t = "ST-";
     foreach ($numbers as $k => $v) {
         $t .= $k + $v . $k * $v . '-';
     }
     $t = substr($t, 0, strlen($t) - 1);
     return $t;
     //echo $t;
 }
Exemple #2
0
//echo file_get_contents('php://input');
$userdata = ["error" => true, "message" => "Erro desconhecido"];
if (!Arr::ContainsAll(Requests::$PhpInput, ["username", "password"])) {
    $userdata["error"] = true;
    $userdata["message"] = "Preencha com Nome e Senha!";
    goto end;
}
$username = Requests::Php("username");
$password = Requests::Php("password");
$user = Habbo::GetHabboByName($username);
if (!$user) {
    $userdata["error"] = true;
    $userdata["message"] = "Este usuário não existe!";
    goto end;
}
if (!Arr::ContainsAll(Requests::$PhpInput, ["username", "password"])) {
    $userdata["error"] = true;
    $userdata["message"] = "Preencha com Nome e Senha!";
    goto end;
}
if (!Habbo::CheckAuth($user, $password)) {
    $userdata["error"] = true;
    $userdata["message"] = "Senha Incorreta!";
    goto end;
}
CM::TryStartSession($username, $password);
$sessiondata = CM::GetSessionData();
$userdata["error"] = false;
$userdata["message"] = "";
$userdata["userdata"] = $user->PrivateInfo();
$userdata["cookie_data"] = ["expire" => $sessiondata->expire, "now" => time(), "reaming_time" => $sessiondata->expire - time()];