-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathtest.php
122 lines (93 loc) · 1.99 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<h1>TESTING...</h1>
<pre><?php
ini_set('error_reporting', "E_ALL | E_STRICT");
var_dump(empty($var));
$var = 9;
if(($var\= 3) !== 3) {
echo "INTEGER DIF FAILED\n";
} else {
echo "PASSED INTEGER DIV\n";
}
if(8 \\ 3 == 2) {
echo "PASSED INTEGER DIV\n";
} else {
echo "INTEGER DIF FAILED\n";
}
if(0b000101 !== 5) {
echo "NO BIN SYNTAX\n";
} else {
echo "PASSED BIN SYNTAX\n";
}
if(!isset($_SERVER['CFD'])) {
echo "NO CFD\n";
} else {
echo "PASSED CFD\n";
}
$str = "bamz";
$str[-3] = '9';
if($str != "b9mz") {
echo "SETTING FAILED\n";
} else {
echo "PASSED SETTING\n";
}
if($str[-2] != "m") {
echo "GETTING FAILED\n";
} else {
echo "PASSED GETTING\n";
}
if(!function_exists('isbit')) {
echo "NO INFUSION!\n";
} else {
echo "PASSED INFUSION\n";
}
if(!class_exists('memcached')) {
echo "NO MEMCACHE!\n";
} else {
echo "PASSED MEMCACHE\n";
}
if(!function_exists('apc_fetch')) {
echo "NO APC!\n";
} else {
echo "PASSED APC\n";
}
$var = null;
if(!isset($var)) {
echo "ISSET ON NULL FAILED\n";
} else {
echo "PASSED ISSET NULL BUG\n";
}
if(htmlspecialchars('"\'', ENT_QUOTES) !== htmlspecialchars('"\'')) {
echo "HTMLSPECIALCHARS PATCH FAILED\n";
}else {
echo "PASSED HTMLSPECIALCHARS PATCH\n";
}
if(!function_exists('typeof') || typeof(microtime()) != 3) {
echo "MICROTIME() PATCH FAILED\n";
} else {
echo "PASSED MICROTIME() PATCH\n";
}
define('DBUSER', "commander");
define('DBPASS', "39rH2W39aHGf");
define('DBNAME', "cluster");
$db = mysqli_connect('94.186.149.41', DBUSER, DBPASS, 'cluster23');
$res = mysqli_query($db, "SELECT UID, UName FROM user WHERE UID=23");
while($row=mysqli_fetch_assoc($res)) {
if(gettype($row['UID']) == 'string') {
echo "MYSQL PATCH FAILED\n";
} else {
echo "PASSED MYSQL PATCH\n";
}
}
mysqli_close($db);
// TODO:
// test session bday + nocache
// test include warnings off
passthru('convert>/dev/null', $ret);
if($ret !== 0) {
echo "NO IMAGEMAGICK INSTALLED\n";
} else {
echo "IMAGEMAGICK OK\n";
}
echo "\n\n\n";
print_r($_SERVER);
?></pre>