Ejemplo n.º 1
0
         }
     }
     if ($assetsfolder) {
         $z = "/";
     } else {
         $z = ".zip";
     }
     if (!file_exists("clients/assets" . $z) || !file_exists("clients/" . $client . "/bin/") || !file_exists("clients/" . $client . "/mods/") || !file_exists("clients/" . $client . "/coremods/") || !file_exists("clients/" . $client . "/config.zip")) {
         die(Security::encrypt("client<\$> {$client}", $key1));
     }
     $md5user = strtoint(xorencode(str_replace('-', '', uuidConvert($realUser)), $protectionKey));
     $md5zip = @md5_file("clients/" . $client . "/config.zip");
     $md5ass = @md5_file("clients/assets.zip");
     $sizezip = @filesize("clients/" . $client . "/config.zip");
     $sizeass = @filesize("clients/assets.zip");
     $echo1 = "{$masterversion}<:>{$md5user}<:>" . $md5zip . "<>" . $sizezip . "<:>" . $md5ass . "<>" . $sizeass . "<br>" . $realUser . '<:>' . strtoint(xorencode($sessid, $protectionKey)) . '<br>' . $acesstoken . '<br>';
     if ($assetsfolder) {
         echo Security::encrypt($echo1 . str_replace("\\", "/", checkfiles('clients/' . $client . '/bin/') . checkfiles('clients/' . $client . '/mods/') . checkfiles('clients/' . $client . '/coremods/') . checkfiles('clients/assets')) . '<::>assets/indexes<:b:>assets/objects<:b:>assets/virtual<:b:>' . $client . '/bin<:b:>' . $client . '/mods<:b:>' . $client . '/coremods<:b:>', $key1);
     } else {
         echo Security::encrypt($echo1 . str_replace("\\", "/", checkfiles('clients/' . $client . '/bin/') . checkfiles('clients/' . $client . '/mods/') . checkfiles('clients/' . $client . '/coremods/')) . '<::>' . $client . '/bin<:b:>' . $client . '/mods<:b:>' . $client . '/coremods<:b:>', $key1);
     }
 } else {
     if ($action == 'getpersonal') {
         $stmt = $db->prepare("SELECT user,realmoney FROM usersession WHERE user= :login");
         $stmt->bindValue(':login', $login);
         $stmt->execute();
         $row = $stmt->fetch(PDO::FETCH_ASSOC);
         $realmoney = $row['realmoney'];
         if ($iconregistered) {
             $stmt = $db->prepare("SELECT username,balance FROM iConomy WHERE username= :login");
             $stmt->bindValue(':login', $login);
Ejemplo n.º 2
0
     $stmt = $db->prepare("SELECT id,user FROM usersession WHERE user= :login");
     $stmt->bindValue(':login', $realUser);
     $stmt->execute();
     $realUs = $stmt->fetch(PDO::FETCH_ASSOC);
     if ($login == $realUs['user']) {
         $stmt = $db->prepare("UPDATE usersession SET session = '{$sessid}' WHERE user= :login");
         $stmt->bindValue(':login', $realUser);
         $stmt->execute();
     } else {
         $stmt = $db->prepare("INSERT INTO usersession (user, session, md5) VALUES (:login, '{$sessid}', :md5)");
         $stmt->bindValue(':login', $login);
         $stmt->bindValue(':md5', md5($realUser));
         $stmt->execute();
     }
     $md5us = md5($realUser);
     $md5user = strtoint(xorencode($md5us, $protectionKey));
     /*$md5zip	  = @md5_file("clients/".$client."/config.zip");
       $md5ass	  = @md5_file("clients/assets.zip");
       $sizezip  = @filesize("clients/".$client."/config.zip");
       $sizeass  = @filesize("clients/assets.zip");*/
     $finfo = array();
     foreach ($files as $f) {
         array_push($finfo, array("path" => $f, "check" => preg_match("/\\.jar\$/i", $f), "md5" => preg_match("/\\.jar\$/i", $f) ? md5_file($f) : null, "size" => @filesize($f)));
     }
     exit(Security::encrypt(json_encode(array("error" => false, "code" => STATUS_OK, "text" => "Success", "line" => __LINE__, "file" => __FILE__, "files" => $finfo, "sid" => $sessid, "version" => $masterversion)), $key1));
 } else {
     if ($action == 'getpersonal') {
         $stmt = $db->prepare("SELECT user,realmoney FROM usersession WHERE user= :login");
         $stmt->bindValue(':login', $login);
         $stmt->execute();
         $row = $stmt->fetch(PDO::FETCH_ASSOC);
Ejemplo n.º 3
0
function getSession()
{
    include "connect.php";
    $loginName = $_GET['user'];
    $login = mysql_real_escape_string($loginName);
    $query = "SELECT {$db_columnUser}, {$db_columnSesId} FROM {$db_table} WHERE {$db_columnUser}='{$login}'";
    $result = mysql_query($query) or die(mysql_error());
    $row = mysql_fetch_assoc($result);
    $sessionid = $row[$db_columnSesId];
    $sessid = strtoint(xorencode($sessionid, $sessidkey));
    die("4:" . $sessid);
}