当前位置: 首页>>代码示例>>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;未经允许,请勿转载。