summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-06-13server: mark the worker socket as non-blockingDanny Holman
Mark the socket in the worker function as non-blocking and run poll(). This should be done in order to prevent a slow loris attack on the C&C server. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-05-17server: add headers to check functionDanny Holman
Add stdarg.h and time.h to the check headers function in the configure script. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-05-17server: create utility functionsDanny Holman
Create a new file for utility functions, including those that strip whitespace from and break apart strings. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-05-17README: clarify system requirementsDanny Holman
Clarify what both a client and server system must have in order to run mini-RAT. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-05-14server: session: add function returning sessionsDanny Holman
Add a function that returns the number of current sessions. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-05-14server: session: return number of bytes writtenDanny Holman
Return the number of bytes written to a session socket handle or -1 on error. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-02-15fixup! main: add a command line processorDanny Holman
2023-02-15session: simplify read_sessionDanny Holman
Simplify the function read_session and provide some error checking. This function should now return -1 if a valid session with the given ID cannot be found. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-02-15session: add error checking to session creationDanny Holman
Add a check in init_session that returns -1 if malloc cannot create a new session. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-02-15session: add an alive flag to struct sessionDanny Holman
Add a flag to struct session that indicates whether or not the underlying socket is still open. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-02-15main: add a command line processorDanny Holman
Add a function that processes incoming user commands. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-02-15server: display errors and warnings in shellDanny Holman
Print LOG_WARNING and LOG_SEVERE messages into stderr. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-02-15server: add a basic container_of macroDanny Holman
Add a basic container_of macro to list.h. This is primarily for systems in which container_of has no definition. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-01-04server: add a main header and source fileDanny Holman
Add a main header and source file so that every required header is checked against the config.h generated by autoconf. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-01-04server: add functions for session managementDanny Holman
Add functions to initialize and control individual sessions. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-01-04server: add a file for commonly used macrosDanny Holman
Add a file to the server-side for commonly used macros. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-01-04server: add a linked list implementationDanny Holman
Add a linked list implementation for generic use. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-01-04server: add server control functionsDanny Holman
Add functions that initialize and control the server listening socket. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-01-04logging: add a close functionDanny Holman
Add a close function to close the file handle pointing at the log file. Signed-off-by: Danny Holman <dholman@gymli.org>
2022-11-18server: add a logging frameworkDanny Holman
Add a logging framework so the server can output to a single point. Signed-off-by: Danny Holman <dholman@gymli.org>
2022-11-17Initial commitDanny Holman
Signed-off-by: Danny Holman <dholman@gymli.org>