protected function createServer($response) { $port = 1337; $cmd = 'echo -e "' . str_replace("\r\n", '\\r\\n', $response) . '" | nc -lC ' . $port; }