$TLT_MAX_REQ_LENGTH) ? $TLT_MAX_REQ_LENGTH : $reqLength; // Open the input stream for access to raw POST data $postFileHandle = fopen("php://input", 'rb'); if ($postFileHandle) { while ($actualReadLength < $maxReadLength) { $postData = fread($postFileHandle, $maxReadLength); if ($postData) { $actualReadLength += strlen($postData); } else if ($postData != ""){ echo "postData ---- $postData"; $html .= "
\r\nFailed to read the raw POST data. Read of the input stream failed.\r\n
\r\n"; break; } else { break; } $postData = null; } fclose($postFileHandle); } else { $html .= "
\r\nFailed to read the raw POST data. Open of the input stream failed.\r\n
\r\n"; } } catch (Exception $e) { $html .= "
\r\nException when reading request data!\r\n
\r\n".$e->getMessage()."\r\n
\r\n"; } $end = MSTimestamp(); $html .= "
\r\n\r\nRead $actualReadLength bytes in ".round($end-$start, 2)."ms\r\n\r\n"; return $html; } return ""; } /* * Check for URL arguments to send optional debugging information back to the client * * Supported arguments: * "server": sends a hash value of the server name and IP. Useful to identify the specific * system when the target is deployed on multiple webservers. */ function ProcessArguments() { $html = ""; $includeServer = isset($_GET['server']); if ($includeServer) { $serverName = isset($_SERVER['SERVER_NAME']) ? md5($_SERVER['SERVER_NAME']) : 'unknown'; $serverIP = isset($_SERVER['SERVER_ADDR']) ? md5($_SERVER['SERVER_ADDR']) : (isset($_SERVER['LOCAL_ADDR']) ? md5($_SERVER['LOCAL_ADDR']) : 'unknown'); // On some web servers (IIS) SERVER_ADDR does not exist. Instead use LOCAL_ADDR. $html .= "
\r\n$serverName\r\n"; $html .= "
\r\n$serverIP\r\n"; } return $html; } ?> TealeafTarget.php We are in the correct PHP file