Ejemplo n.º 1
0
function register()
{
    global $host, $path, $username, $password;
    print "\n[-] Registering new user '{$username}' with password '{$password}'\n";
    // register a new account
    $data = "user_name={$username}";
    $data .= "&password={$password}";
    $data .= "&confirm_password={$password}";
    $data .= "&email_address=" . md5(time()) . "@null.com";
    $data .= "&form_submitted=yes";
    $data .= "&terms=yes";
    $packet = "POST {$path}register.php HTTP/1.0\r\n";
    $packet .= "Host: {$host}\r\n";
    $packet .= "Content-Length: " . strlen($data) . "\r\n";
    $packet .= "Content-Type: application/x-www-form-urlencoded\r\n";
    $packet .= "Connection: close\r\n\r\n";
    $packet .= $data;
    http_send($host, $packet);
    $code = retrive_data("random_code", "member_profile", "user_name=" . encodeSQL($username));
    if (!isset($code)) {
        die("\n[-] Registration failed...\n");
    }
    // and confirm the registration
    $packet = "GET {$path}confirm.php?id={$code} HTTP/1.0\r\n";
    $packet .= "Host: {$host}\r\n";
    $packet .= "Connection: close\r\n\r\n";
    if (!preg_match("/registration is now complete/i", http_send($host, $packet))) {
        die("\n[-] Registration failed...\n");
    }
}
Ejemplo n.º 2
0
        }
    } else {
        $icon = '';
        $sortdirection = 'desc';
    }
    if ($field == 'tools' || $field == 'languages') {
        $extra_text = $label;
    } else {
        $extra_text = '<a href="#" style="text-decoration: none;" onClick="loadingContent(' . $sws_current_page . ',' . $sws_previussubjecpage . ',\'' . $sws_folder . '\',\'' . $sws_title . '\', \'false\'   ,\'' . $field . '\',\'' . $sortdirection . '\');return false;">' . $label . '</a>';
    }
    $content .= '<th width="' . $sws_columnsWidth[$i] . '">' . $icon . ' ' . $extra_text . '</th>';
    $i++;
}
$content .= '</tr>
	</thead>
		' . retrive_data($_POST['type'], $data_array) . '
</table>';
$content .= '<div>' . index_indicator() . '</div>';
//-------------------------------------------- functioner
function retrive_data($name, $data_array)
{
    global $wpdb, $sws_columns, $sws_columnsWidth, $sws_limit_to, $sws_limit_from, $group, $sws_current_page;
    $tmp_content = "";
    if (!empty($data_array)) {
        for ($i = $sws_limit_from; $i < $sws_limit_to; $i++) {
            $row = $data_array[$i];
            if ($group == true) {
                $tmp_content .= '<tr style="cursor: pointer;" onMouseOver="jQuery(this).css(\'background-color\',\'#EEEEEE\');" onMouseOut="jQuery(this).css(\'background-color\',\'#FFFFFF\');" onclick="loadingContent(0,' . $sws_current_page . ',\'' . $row['folder'] . '\',\'' . $row['title'] . '\',\'true\');">';
            } else {
                if ($row['editible'] == 'true') {
                    $tmp_content .= '<tr onMouseOver="jQuery(this).css(\'background-color\',\'#EEEEEE\');" onMouseOut="jQuery(this).css(\'background-color\',\'#FFFFFF\');">';