本文整理汇总了PHP中WC_Challenge::dummyChallenge方法的典型用法代码示例。如果您正苦于以下问题:PHP WC_Challenge::dummyChallenge方法的具体用法?PHP WC_Challenge::dummyChallenge怎么用?PHP WC_Challenge::dummyChallenge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WC_Challenge
的用法示例。
在下文中一共展示了WC_Challenge::dummyChallenge方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __wakeup
public function __wakeup()
{
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 2, 'challenge/are_you_serial/index.php');
}
$chall->onChallengeSolved(GWF_Session::getUserID());
}
示例2: chdir
<?php
chdir("../../../../");
define('GWF_PAGE_TITLE', 'Training: GPG');
require_once 'challenge/html_head.php';
require_once GWF_CORE_PATH . 'module/WeChall/WC_CryptoChall.php';
require_once GWF_CORE_PATH . 'module/WeChall/solutionbox.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 2, '/challenge/training/crypto/gpg/index.php', false);
}
$chall->showHeader();
WC_CryptoChall::checkSolution($chall, 'OHOYOUGOTGPG!', true, false);
if (false !== Common::getPost('send')) {
wccgpg_doit($chall, GWF_Session::getUser());
}
$url = GWF_WEB_ROOT . 'account';
echo GWF_Box::box($chall->lang('info', array($url)), $chall->lang('title'));
$form = '<form action="index.php" method="post">' . PHP_EOL;
$form .= '<input type="submit" name="send" value="' . $chall->lang('btn_send') . '" />' . PHP_EOL;
$form .= '</form>' . PHP_EOL;
echo GWF_Box::box($form);
formSolutionbox($chall);
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
function wccgpg_doit(WC_Challenge $chall, $user)
{
if ($user === false) {
echo GWF_HTML::error('GPG', $chall->lang('err_login'), false);
return;
}
if (!$user->hasValidMail()) {
示例3: chdir
<?php
chdir('../../');
define('GWF_PAGE_TITLE', 'Fremes');
require_once 'challenge/html_head.php';
require_once GWF_CORE_PATH . 'module/WeChall/solutionbox.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 4, 'challenge/FREMES/index.php', false);
}
$chall->showHeader();
if (false !== ($answer = Common::getPostString('answer', false))) {
if (false === ($key = GWF_Session::get('FREMEN_KEY', false))) {
echo GWF_HTML::error('Fremes', $chall->lang('err_try'));
} else {
$solution = GWF_Numeric::baseConvert($key, 2, 16);
$slen = strlen($solution);
$wlen = 128 / 4;
$nlen = $wlen - $slen;
$solution = str_repeat('0', $nlen) . $solution;
$answer = strtoupper($answer);
$solution = strtoupper($solution);
if ($answer === $solution || substr($answer, 2) === $solution) {
$chall->onChallengeSolved(GWF_Session::getUserID());
} else {
echo WC_HTML::error('err_wrong');
}
}
}
echo GWF_Box::box($chall->lang('info', array(128, 'fremes.php')), $chall->lang('title'));
echo formSolutionbox($chall);
require_once 'challenge/html_foot.php';
示例4: chdir
<?php
chdir('../../../');
define('GWF_PAGE_TITLE', 'Shadowlamb - Chapter I');
require_once 'challenge/html_head.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 1, 'challenge/lamb/shadowlamb1/index.php');
}
$chall->showHeader();
echo GWF_Box::box(base64_encode($chall->lang('client_info')), $chall->lang('client_it'));
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
示例5: chdir
<?php
chdir('../../../../');
define('GWF_PAGE_TITLE', 'Encodings: URL');
require_once 'challenge/html_head.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 1, 'challenge/training/encodings/url/index.php', false);
}
$chall->showHeader();
require_once GWF_CORE_PATH . 'module/WeChall/WC_CryptoChall.php';
$solution = WC_CryptoChall::generateSolution('OHNOU_R_Ls', true, true);
if (Common::getGetString('p', '') === $solution) {
$chall->onChallengeSolved(GWF_Session::getUserID());
}
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
示例6: header
if (isset($_GET['show']) && is_string($_GET['show'])) {
if ($_GET['show'] === 'smile') {
header('Content-Type: text/plain;');
die(file_get_contents('smile.php'));
} elseif ($_GET['show'] === 'livin_smile') {
header('Content-Type: text/plain;');
die(file_get_contents('LIVIN_Smile.php'));
}
}
# -------------------------- #
chdir('../../../');
define('GWF_PAGE_TITLE', 'Smile');
require_once 'challenge/html_head.php';
require_once GWF_CORE_PATH . 'module/WeChall/solutionbox.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 4, 'challenge/livinskull/smile/index.php', false);
}
$chall->showHeader();
# -------------------------- #
if (false !== ($answer = Common::getPostString('answer', false))) {
require_once 'challenge/livinskull/smile/LIVIN_Smile.php';
$solution = LIVIN_Smile::getSolution();
if ($answer === $solution) {
$chall->onChallengeSolved(GWF_Session::getUserID());
} else {
echo WC_HTML::error('err_wrong');
}
}
# -------------------------- #
$url1 = 'index.php?show=smile';
$url2 = 'index.php?highlight=smile';
示例7: chdir
<?php
chdir("../../../");
define('GWF_PAGE_TITLE', 'Training: Get Sourced');
require_once "challenge/html_head.php";
require GWF_CORE_PATH . 'module/WeChall/solutionbox.php';
if (false === ($chall = WC_Challenge::getByTitle('Training: Get Sourced'))) {
$chall = WC_Challenge::dummyChallenge('Training: Get Sourced');
}
$chall->showHeader();
$chall->onCheckSolution();
?>
<div class="box box_c">
<p><?php
echo $chall->lang('info');
?>
</p>
<p style="color:#e5e5e5;"><?php
echo $chall->lang('info2');
?>
</p>
</div>
<!-- <?php
echo $chall->lang('comment');
?>
-->
<?php
formSolutionbox($chall);
require_once "challenge/html_foot.php";
?>
<!-- <?php
示例8: header
<?php
if (isset($_GET['show']) && is_string($_GET['show'])) {
if ($_GET['show'] === 'source') {
header('Content-Type: text/plain; charset=UTF-8;');
die(file_get_contents('nootherdomain.php'));
} elseif ($_GET['show'] === 'noothtable') {
header('Content-Type: text/plain; charset=UTF-8;');
die(file_get_contents('noothtable.php'));
}
}
chdir('../../../');
define('GWF_PAGE_TITLE', 'Stop us');
require_once 'challenge/html_head.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 3, 'challenge/noother/stop_us/index.php', false);
}
$chall->showHeader();
# -------------------------- #
$href1 = 'index.php?show=source';
$href2 = 'index.php?highlight=christmas';
$href3 = 'index.php?show=noothtable';
$href4 = 'index.php?highlight=noothtable';
$jjk = 'jjk';
$dloser = 'dloser';
echo GWF_Box::box($chall->lang('info', array('nootherdomain.php', $href1, $href2, $href3, $href4, $jjk, $dloser)), $chall->lang('title'));
# -------------------------- #
if (false !== ($file = Common::getGetString('highlight', false))) {
if ($file === 'noothtable') {
$file = 'noothtable.php';
} else {
示例9: chdir
<?php
chdir('../../');
define('GWF_PAGE_TITLE', 'Screwed Signup - Login');
require_once 'challenge/html_head.php';
if (false === ($chall = WC_Challenge::getByTitle('Screwed Signup'))) {
$chall = WC_Challenge::dummyChallenge('Screwed Signup', 7, 'challenge/screwed_signup/index.php', false);
}
$chall->showHeader();
require_once 'screwed_signup.include';
if (isset($_POST['login'])) {
screwed_signupLogin($chall);
}
?>
<div class="box box_c"><a href="register.php"><?php
echo $chall->lang('btn_register');
?>
</a></div>
<?php
htmlTitleBox($chall->lang('login_title'), $chall->lang('login_info'));
?>
<form action="" method="post">
<?php
#Session::CSRF();
?>
<table>
<tr>
示例10: chdir
<?php
chdir('../../../');
define('GWF_PAGE_TITLE', 'The Last Hope');
require_once 'challenge/html_head.php';
require GWF_CORE_PATH . 'module/WeChall/solutionbox.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 4, 'challenge/bsdhell/thelasthope/index.php', false);
}
$chall->showHeader();
if (strcasecmp(Common::getPost('answer'), 'username_password') === 0) {
$count = GWF_Counter::getCount('WC_BSD_LH_DOLT');
if (false === GWF_Session::getOrDefault('WC_BSD_LH_DOLT', false)) {
$count++;
GWF_Counter::saveCounter('WC_BSD_LH_DOLT', $count);
GWF_Session::set('WC_BSD_LH_DOLT', '1');
}
echo GWF_HTML::message('The Last Hope', $chall->lang('msg_literal'), false);
echo GWF_HTML::error('The Last Hope', $chall->lang('err_literal', array($count)), false);
} else {
$chall->onCheckSolution();
}
htmlTitleBox($chall->lang('title'), $chall->lang('info', array('bsd_thelasthope.elf')));
formSolutionbox($chall);
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
示例11: chdir
<?php
chdir('../../../');
define('GWF_PAGE_TITLE', 'Z - Reloaded');
require_once 'challenge/html_head.php';
$title = 'Z - Reloaded';
if (false === ($chall = WC_Challenge::getByTitle($title))) {
$chall = WC_Challenge::dummyChallenge($title, 6, '/challenge/Z/reloaded', false);
}
$chall->showHeader();
htmlTitleBox($chall->lang('title'), $chall->lang('info', array('zshellz.php')));
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
示例12: chdir
<?php
$data = (require 'data.php');
$solution = (require 'solution.php');
require 'expdb.php';
chdir('../../../../');
define('GWF_PAGE_TITLE', 'Experience');
require_once 'challenge/html_head.php';
require_once GWF_CORE_PATH . 'module/WeChall/solutionbox.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 3, 'challenge/training/php/experience/index.php', $solution);
}
$chall->showHeader();
$chall->onCheckSolution();
$user = GWF_User::getStaticOrGuest();
$username = $user->isGuest() ? $chall->lang('guest') : $user->displayUsername();
$hint = '<span style="color:#fff;">' . $chall->lang('hint') . '</span>' . PHP_EOL;
echo GWF_Box::box($chall->lang('descr', array($username, $hint)));
if (!($db = gdo_db_instance(EXP_DB_HOST, EXP_DB_USER, EXP_DB_PASS, EXP_DB_NAME))) {
echo GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
} else {
require 'blackbox.php';
formSolutionbox($chall);
}
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
示例13: chdir
<?php
chdir('../../../../');
define('GWF_PAGE_TITLE', 'Training: WWW-Robots');
require_once 'challenge/html_head.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 1, 'challenge/training/www/robots/index.php');
}
$chall->showHeader();
echo GWF_Box::box($chall->lang('info'), $chall->lang('title'));
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
示例14: chdir
<?php
chdir('../../../../');
define('GWF_PAGE_TITLE', 'Training: Caterpillar');
require_once 'challenge/html_head.php';
require_once GWF_CORE_PATH . 'module/WeChall/solutionbox.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 2, 'challenge/training/stegano/caterpillar/index.php');
}
$chall->showHeader();
$chall->onCheckSolution();
echo GWF_Box::box($chall->lang('info', array('caterpillar.png')), $chall->lang('title'));
formSolutionbox($chall);
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
示例15: chdir
<?php
chdir('../../../../');
define('GWF_PAGE_TITLE', 'AUTH me');
require_once 'challenge/html_head.php';
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 2, 'challenge/space/auth_me/index.php', false);
}
$chall->showHeader();
$chall->onChallengeSolved();
# THE GAME! ;)
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';