本文整理汇总了PHP中dvwaPageStartup函数的典型用法代码示例。如果您正苦于以下问题:PHP dvwaPageStartup函数的具体用法?PHP dvwaPageStartup怎么用?PHP dvwaPageStartup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dvwaPageStartup函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
<?php
define('DVWA_WEB_PAGE_TO_ROOT', '../');
require_once DVWA_WEB_PAGE_TO_ROOT . 'dvwa/includes/dvwaPage.inc.php';
dvwaPageStartup(array('authenticated', 'phpids'));
$page = dvwaPageNewGrab();
$page['title'] .= $page['title_separator'] . 'Source';
$id = $_GET['id'];
$security = $_GET['security'];
if ($id == 'fi') {
$vuln = 'File Inclusion';
} elseif ($id == 'brute') {
$vuln = 'Brute Force';
} elseif ($id == 'csrf') {
$vuln = 'CSRF';
} elseif ($id == 'exec') {
$vuln = 'Command Execution';
} elseif ($id == 'sqli') {
$vuln = 'SQL Injection';
} elseif ($id == 'sqli_blind') {
$vuln = 'SQL Injection (Blind)';
} elseif ($id == 'upload') {
$vuln = 'File Upload';
} elseif ($id == 'xss_r') {
$vuln = 'Reflected XSS';
} elseif ($id == 'captcha') {
$vuln = 'Insecure CAPTCHA';
} else {
$vuln = 'Stored XSS';
}
$source = @file_get_contents(DVWA_WEB_PAGE_TO_ROOT . "vulnerabilities/{$id}/source/{$security}.php");
示例2: define
<?php
define('DVWA_WEB_PAGE_TO_ROOT', '');
require_once DVWA_WEB_PAGE_TO_ROOT . 'dvwa/includes/dvwaPage.inc.php';
dvwaPageStartup(array('phpids'));
dvwaDatabaseConnect();
dvwaGetconfig();
#dvwadebug();
if (isset($_POST['reg'])) {
$user = trim($_POST['username']);
$user = stripslashes($user);
$user = mysql_real_escape_string($user);
$pass = trim($_POST['password']);
$pass = stripslashes($pass);
$pass = mysql_real_escape_string($pass);
$pass_md5 = md5($pass);
$insert_md5 = "insert into users values ('','{$user}','{$user}','{$user}','{$pass_md5}','dvwa/hackable/users/gordonb.jpg')";
if ($user != '' and $pass != '' and $_POST['password'] == $_POST['password2']) {
// Login Successful...
$result_md5 = @mysql_query($insert_md5) or die('<pre>' . mysql_error() . '</br>insert fail,again!!</pre>');
dvwaRedirect('index.php');
dvwaMessagePush("You have reg succfully for '" . $user . "'");
dvwaLogin($user);
dvwaRedirect('login.php');
}
// Login failed
dvwaMessagePush("reg failed");
dvwaRedirect('reg.php');
}
$messagesHtml = messagesPopAllToHtml();
Header('Cache-Control: no-cache, must-revalidate');