| OLD | NEW |
| 1 <?php | 1 <?php |
| 2 require_once '../../resources/portabilityLayer.php'; | 2 require_once '../../resources/portabilityLayer.php'; |
| 3 | 3 |
| 4 function prettify($name) { | 4 function prettify($name) { |
| 5 return str_replace(' ', '-', ucwords(str_replace('_', ' ', str_replace('http_
', '', strtolower($name))))); | 5 return str_replace(' ', '-', ucwords(str_replace('_', ' ', str_replace('http_
', '', strtolower($name))))); |
| 6 } | 6 } |
| 7 | 7 |
| 8 $beaconFilename = sys_get_temp_dir() . "/beacon" . (isset($_REQUEST['name']) ? $
_REQUEST['name'] : "") . ".txt"; | 8 $beaconFilename = sys_get_temp_dir() . "/beacon" . (isset($_REQUEST['name']) ? $
_REQUEST['name'] : "") . ".txt"; |
| 9 $beaconFile = fopen($beaconFilename . ".tmp", 'w'); | 9 $beaconFile = fopen($beaconFilename . ".tmp", 'w'); |
| 10 $httpHeaders = $_SERVER; | 10 $httpHeaders = $_SERVER; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 $postdata = http_build_query($_POST); | 25 $postdata = http_build_query($_POST); |
| 26 | 26 |
| 27 fwrite($beaconFile, "Length: " . strlen($postdata) . "\n"); | 27 fwrite($beaconFile, "Length: " . strlen($postdata) . "\n"); |
| 28 if (strpos($contentType, "application/") !== false) { | 28 if (strpos($contentType, "application/") !== false) { |
| 29 $postdata = base64_encode($postdata); | 29 $postdata = base64_encode($postdata); |
| 30 } | 30 } |
| 31 | 31 |
| 32 fwrite($beaconFile, "Body: $postdata\n"); | 32 fwrite($beaconFile, "Body: $postdata\n"); |
| 33 fclose($beaconFile); | 33 fclose($beaconFile); |
| 34 rename($beaconFilename . ".tmp", $beaconFilename); | 34 rename($beaconFilename . ".tmp", $beaconFilename); |
| 35 foreach ($_COOKIE as $name => $value) | 35 |
| 36 setcookie($name, "deleted", time() - 60, "/"); | 36 if (!array_key_exists('dontclearcookies', $_GET)) { |
| 37 foreach ($_COOKIE as $name => $value) |
| 38 setcookie($name, "deleted", time() - 60, "/"); |
| 39 } |
| 37 ?> | 40 ?> |
| OLD | NEW |