-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathapi.php
More file actions
42 lines (31 loc) · 776 Bytes
/
Copy pathapi.php
File metadata and controls
42 lines (31 loc) · 776 Bytes
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
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . 'library/phpseclib');
require_once 'library/MainFunction.php';
require_once 'Net/SSH2.php';
require_once 'library/Requests.php';
require_once 'library/AppFunction.php';
Requests::register_autoloader();
$merlin_php = new merlin_php();
if (!isset($_POST)) {
$merlin_php -> _export("no input");
exit;
}
$o = _GET("class",'unknow');
$f = _GET('function','unknow');
if ($o == 'unknow') {
$merlin_php -> _export("no input");
exit;
}
if ($f == 'unknow') {
$merlin_php -> _export("function?!");
exit;
}
if (!class_exists($o)) {
$merlin_php -> _export("class is none");
exit;
}
$c = new $o();
$agrs = implode(',',$_POST);
// echo '$c->'."$f($agrs);";
eval('$j = $c->'."$f($agrs);");
echo json_encode($j);