Skip to content

Host your whole system (or maybe a dir). Just like python HTTPServer.🧮

License

Notifications You must be signed in to change notification settings

luckythandel/loki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Loki

forthebadge forthebadge forthebadge

About the Loki

Loki is a simple tcp server which can send files to multipal clients simulteniously. It serves raw TCP requests and HTTP GET requests as well which means you can use wget, curl, axel and such tools as a client to connect with this. You can use netcat/nc/ncat or you can write your own socket script to work with its raw TCP functionality. And since the Loki is made in C with pure syscalls and proper logic, you will find it really fast. Loki can be used while playing HackTheBox machines and VulnHub machines in place of a python/php HTTP server.

asciicast

Features

  • easy synthax
  • faster than any other tool
  • auditing functions (requests.log)
  • multithreaded
  • accept raw TCP & HTTP GET requests
  • memory-efficient
  • installation is easy
  • easy to modify

Compilation

  • clone the repo
❯ git clone https://github.com/luckythandel/loki.git
  • compile it
❯ make
  • compiled binaries in bin/ directory

modiftion before compilaton

  • change the maximum request length in server.h (line 1)
#define REQUEST_LEN 1000
  • change the maximum threads (server handling amount of clinet at the same time, line 2)
#define MAX_THREADS 2000
  • proper request sanitization by the server. prevents from attacks like LFI but you can intentionally enable it (line 4)
#define INPUT_VALIDATION 0
  • file content size is 10mb by default (line 3)
#define FILE_CONTENT_SIZE 10000000