Example #1
0
function checkfiles($currentdir, $ext = '', $sub = 1, $skip = '')
{
    global $md5data;
    $dir = @opendir($currentdir);
    $exts = '/(' . $ext . ')$/i';
    $skips = explode(',', $skip);
    while ($entry = @readdir($dir)) {
        $file = $currentdir . $entry;
        if ($entry != '.' && $entry != '..' && $entry != '.svn' && (preg_match($exts, $entry) || $sub && is_dir($file)) && !in_array($entry, $skips)) {
            if ($sub && is_dir($file)) {
                checkfiles($file . '/', $ext, $sub, $skip);
            } else {
                $md5data[$file] = md5_file($file);
            }
        }
    }
}
Example #2
0
     } 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);
             $stmt->execute();
             $row = $stmt->fetch(PDO::FETCH_ASSOC);
             $iconmoney = $row['balance'];
         } else {
Example #3
0
 function hashc($assetsfolder, $client)
 {
     if ($assetsfolder) {
         $hash_md5 = str_replace("\\", "/", checkfiles('clients/' . $client . '/bin/') . checkfiles('clients/' . $client . '/mods/') . checkfiles('clients/' . $client . '/coremods/') . checkfiles('clients/' . $client . '/natives/') . checkfiles('clients/' . $client . '/scripts/') . checkfiles('clients/assets')) . '<::>assets/indexes<:b:>assets/objects<:b:>assets/virtual<:b:>' . $client . '/bin<:b:>' . $client . '/mods<:b:>' . $client . '/coremods<:b:>' . $client . '/natives<:b:>' . $client . '/scripts<:b:>';
     } else {
         $hash_md5 = str_replace("\\", "/", checkfiles('clients/' . $client . '/bin/') . checkfiles('clients/' . $client . '/mods/') . checkfiles('clients/' . $client . '/coremods/') . checkfiles('clients/' . $client . '/natives/') . checkfiles('clients/' . $client . '/scripts/')) . '<::>' . $client . '/bin<:b:>' . $client . '/mods<:b:>' . $client . '/coremods<:b:>' . $client . '/natives<:b:>' . $client . '/scripts<:b:>';
     }
     return $hash_md5;
 }
Example #4
0
    // when they're not logged in
    if ($binfo['requireregistration'] == true) {
        if ($_SESSION['username'] == false) {
            THdie("POnonewth");
        }
        // Set the posting username to be the user stored in our session info
        $_POST['nombre'] = $_SESSION['username'];
    }
}
if ($binfo['tlock'] == 1 && $mod == false) {
    THdie("POnonewth");
}
//File checking and processing here, I suppose.
$filemessages = array();
// Array of strings regarding "bad" files
$goodfiles = checkfiles($binfo, $filemessages);
//echo(count($goodfiles));
if ($binfo['tpix'] == 0 && count($goodfiles) > 0 && $mod == false) {
    THdie("POthnopix");
}
if ($binfo['tpix'] == 2 && count($goodfiles) == 0 && $mod == false) {
    THdie("POthmustpix");
}
if (count($goodfiles) == 0 && !$_POST['body'] && $mod == false) {
    //oops, tyam moment
    THdie("You must post images or leave a comment.");
}
$pin = (int) ($_POST['pin'] == "on" && $mod);
$lock = (int) ($_POST['lock'] == "on" && $mod);
$permasage = (int) ($_POST['permasage'] == "on" && $mod);
$usethese = preptrip($_POST['nombre']);