當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WC_Challenge::installChallenge方法代碼示例

本文整理匯總了PHP中WC_Challenge::installChallenge方法的典型用法代碼示例。如果您正苦於以下問題:PHP WC_Challenge::installChallenge方法的具體用法?PHP WC_Challenge::installChallenge怎麽用?PHP WC_Challenge::installChallenge使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WC_Challenge的用法示例。


在下文中一共展示了WC_Challenge::installChallenge方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: chdir

<?php

require_once 'settings.php';
require_once 'vuln.php';
chdir("../../../");
require_once "challenge/html_head.php";
$title = 'Light in the Darkness';
html_head("Install: {$title}");
if (!GWF_User::isAdminS()) {
    return htmlSendToLogin("Better be admin !");
}
$solution = false;
$score = 6;
$url = "challenge/Mawekl/light_in_the_darkness/index.php";
$creators = "Mawekl";
$tags = 'MySQL,Exploit';
if (false === blightInstall()) {
    die('DB ERROR!');
}
WC_Challenge::installChallenge($title, $solution, $score, $url, $creators, $tags, true);
require_once "challenge/html_foot.php";
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:21,代碼來源:install.php

示例2: chdir

<?php

chdir("../../");
require_once "challenge/html_head.php";
if (!GWF_User::isAdminS()) {
    echo GWF_HTML::err('ERR_NO_PERMISSION');
    return;
}
$title = "Can you read me";
$solution = false;
$score = 5;
$url = "challenge/can_you_readme/index.php";
$creators = "Gizmore";
$tags = 'Coding,Image';
htmlDisplayError(WC_Challenge::installChallenge($title, $solution, $score, $url, $creators, $tags, true));
require_once "challenge/html_foot.php";
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:16,代碼來源:install.php

示例3: chdir

<?php

$solution = (require 'solution.php');
chdir("../../../");
require_once "challenge/html_head.php";
$title = 'The BrownOS';
html_head("Install: {$title}");
if (!GWF_User::isAdminS()) {
    return htmlSendToLogin("Better be admin !");
}
$score = 7;
$url = "challenge/dloser/brownos/index.php";
$creators = "dloser";
$tags = 'Unknown';
WC_Challenge::installChallenge($title, $solution, $score, $url, $creators, $tags, true, WC_Challenge::CHALL_CASE_I);
require_once "challenge/html_foot.php";
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:16,代碼來源:install.php

示例4: chdir

$solution = (require 'solution.php');
require_once 'expdb.php';
chdir('../../../../');
require_once "challenge/html_head.php";
//html_head("Install Addslashes");
if (!GWF_User::isAdminS()) {
    echo GWF_HTML::err('ERR_NO_PERMISSION');
    return;
}
// $title = GWF_PAGE_TITLE;
$solution = $solution;
$score = 4;
$url = "challenge/training/php/experience/index.php";
$creators = "Gizmore";
$tags = 'MySQL,PHP,Exploit';
WC_Challenge::installChallenge(GWF_PAGE_TITLE, $solution, $score, $url, $creators, $tags);
if (!($db = gdo_db_instance(EXP_DB_HOST, EXP_DB_USER, EXP_DB_PASS, EXP_DB_NAME))) {
    die(GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)));
}
$db->truncateTable('items');
$db->truncateTable('flags');
foreach ($data as $title) {
    $title = $db->escape($title);
    $db->queryWrite("INSERT INTO items VALUES(0, '{$title}', NOW())");
}
$challenges = GDO::table('WC_Challenge')->selectObjects('*');
foreach ($challenges as $challenge) {
    $challenge instanceof WC_Challenge;
    $random_solution = GWF_Random::randomKey(32);
    $db->queryWrite("INSERT INTO flags VALUES({$challenge->getID()}, '{$random_solution}')");
}
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:31,代碼來源:install.php


注:本文中的WC_Challenge::installChallenge方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。