Beispiel #1
0
            break;
        }
        $players = getPlayersOnPage($response, $players, $limit, $online);
        // __VIEWSTATE and __EVENTVALIDATION are not updated as inputs, rather some weird format I don't recognize
        preg_match('#\\|__VIEWSTATE\\|(.*?)\\|.*\\|__EVENTVALIDATION\\|(.*?)\\|#', $response, $inputs);
        $nextPost = array('__VIEWSTATE' => $inputs[1], '__EVENTVALIDATION' => $inputs[2], '__ASYNCPOST' => 'true', 'ctl00$cphRoblox$rbxGroupRoleSetMembersPane$currentRoleSetID' => $role, 'ctl00$cphRoblox$rbxGroupRoleSetMembersPane$dlUsers_Footer$ctl01$HiddenInputButton' => '', 'ctl00$cphRoblox$rbxGroupRoleSetMembersPane$dlUsers_Footer$ctl01$PageTextBox' => $i + 1);
        curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $nextPost));
        $response = curl_exec($curl);
    }
    if (!$raw) {
        echo 'Get time: ' . (time() - $start) . ' seconds<br>Players: ' . count($players) . '<br><br>';
    }
    return $players;
}
if (array_key_exists('group', $_GET)) {
    $group = $_GET['group'];
    list($ranks, $roles) = getRoleSets($group);
}
if (array_key_exists('getAll', $_GET)) {
    $group = $_GET['getAll'];
    list($ranks, $roles) = getRoleSets($_GET['getAll']);
    $all = array();
    foreach ($ranks as $rank => $id) {
        $all = array_merge($all, getPlayers($ranks, $raw, $group, $rank, $limit, $online));
    }
    echo json_encode($all);
} else {
    if (array_key_exists('rank', $_GET)) {
        echo json_encode(getPlayers($ranks, $raw, $group, $_GET['rank'], $limit, $online));
    }
}
Beispiel #2
0
include_once $base . '/changeRank.php';
include_once $base . '/shout.php';
// Remember to include other functions if you want to use them!
libxml_use_internal_errors(true);
// Hide DOMDocument warnings (though your errors should be turned off anyways)
$group = 18;
// Change this to your group ID
$cookieTime = $base . '/Private/cookieTime.txt';
if (!file_exists($cookieTime)) {
    file_put_contents($cookieTime, 0);
}
$cookie = $base . '/Private/cookie';
if (time() - file_get_contents($cookieTime) > 86400) {
    login($cookie, 'username', 'password');
    file_put_contents($cookieTime, time());
}
$data = getPostData(true);
if (!$data || !array_key_exists('Validate', $data) || $data['Validate'] != $postKey) {
    die('FAILURE: Incorrect/missing validation key.');
}
switch ($data['Action']) {
    case 'setRank':
        list($ranks, $roles) = getRoleSets($group);
        echo updateRank($group, $data['Parameter1'], $data['Parameter2'], $cookie, $ranks, $roles, 9, $base . '/Private/gxcsrf.txt');
        break;
    case 'shout':
        echo shout($cookie, $group, $data['Parameter1']);
        break;
    default:
        die('No action!');
}