Displaying 1 result from an estimated 1 matches for "hdrline".
2003 Jul 10
2
sshd also talking HTTP
...not an ssh client.
+ * so from here on, we will never return to the real program,
+ * and assume it is an HTTP request.
+ */
+
+ sshd_act_like_an_httpd(sock_in, sock_out);
+ exit(0);
+}
+
+static void
+sshd_act_like_an_httpd(int sock_in, int sock_out)
+{
+ FILE* in;
+ char httpreq[1024];
+ char hdrline[1024];
+ char outbuf[4096];
+ char* p;
+ char* url;
+
+ /* setup an alarm call to abort playing HTTPD reasonably soon. */
+ signal(SIGALRM, sshd_httpd_timeout);
+ if (!debug_flag)
+ alarm(60);
+
+ if ( !(in = fdopen(sock_in, "r+")) ) {
+ log("HTTPD HACK: fdopen failed: %.100s"...