-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
52 lines (38 loc) · 1.28 KB
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
define('IN_SHAFFER_FRAME', true);
require_once "system/function/core.php";
require_once 'system/common.inc.php';
require_once 'system/class/widget_password.php';
// md5('zxf123456') == '5949d48b3e54c09db970fb9de152db0d'
$info=array('username'=>'zxf','password'=>'5949d48b3e54c09db970fb9de152db0d');
echo Widget_Password::encrypt($info, $info['password']);
$str = '';
var_dump(empty($str));
$str = "1' or '1' = '1";
echo daddslashes($str);
echo "<br />";
$CookieVersion = 1;
$uid='1';
$user['username']='zxf';
$login_exp = 1361330598 - 90000;
$password_hash = substr(md5('e10adc3949ba59abbe56e057f20f883e'), 8, 8);
$uid='3';
$user['username']='zxf1';
$login_exp = 1461330598 + 900000;
$password_hash = substr(md5('0df995f74be7077b1e6701e958fad01a'), 8, 8);
$token = authcode("{$CookieVersion}\t{$uid}\t{$user['username']}\t{$login_exp}\t{$password_hash}", 'ENCODE');
var_dump($token);
function daddslashes($string, $force = 0, $strip = FALSE) {
!defined('MAGIC_QUOTES_GPC') && define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
if(!MAGIC_QUOTES_GPC || $force) {
if(is_array($string)) {
foreach($string as $key => $val) {
$string[$key] = daddslashes($val, $force, $strip);
}
} else {
$string = addslashes($strip ? stripslashes($string) : $string);
}
}
return $string;
}
?>