GitHub - PandaPrinter/backdoor-web-server: created a minimal HTTP 1.1 server, based on RFC 2616 from scratch, without using any HTTP libraries. The backdoor functionality is that when the server receives a GET request for a URL in the form of /exec/<command>, then the server should take <command> and execute it using the equivalent of the Linux syscall. · GitHub
Skip to content

PandaPrinter/backdoor-web-server

Folders and files

Repository files navigation

Description: Here I use a make file to compile my java program and a script file to execute the application which implements “./normal_web_server <port>” interface. Then the client can input linux command to fetch the executed result at the server side. Since there is a specific format for the input URL, which is “/exec/<command>”, and my server will check the format the URL first. If the URL is in invalid format, server will return http 404 response to the client. If the URL is in right format, the server will try to execute the command, if there is no output, the server will return http 200 response with empty content. However, if the output existed, the server will return http 200 response with the corresponding output. 

In addition, for making server keep working without any interrupt, I create one thread for each socket request. So if one socket request let the server hang there (like cat filename), other socket requests can also be executed by the server, which means the server won’t die if you manually terminate the server.

About

created a minimal HTTP 1.1 server, based on RFC 2616 from scratch, without using any HTTP libraries. The backdoor functionality is that when the server receives a GET request for a URL in the form of /exec/<command>, then the server should take <command> and execute it using the equivalent of the Linux syscall.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors