3#define _CRT_SECURE_NO_WARNINGS
17#define TELNET_PORT (23)
20#define USERID_SIZE (64)
35#define SUPPRESS_GO_AHEAD "\x03"
36#define TERMINAL_TYPE "\x18"
38#define LINEMODE "\x22"
39#define NEWENVIRON "\x27"
42#define HANDSHAKE_TIMEOUT (3)
static const WCHAR Cleanup[]
static VOID ErrorExit(LPTSTR)
static BOOLEAN StartSocketInterface(void)
static void UserLogin(int client_socket)
static DWORD WINAPI UserLoginThread(LPVOID)
static DWORD WINAPI WriteToPipeThread(LPVOID)
static void TerminateShell(client_t *client)
int kickoff_telnetd(void)
static void RunShell(client_t *client)
static void CreateSocket(void)
static int ReceiveLine(int sock, char *buffer, int len, EchoMode echo)
static void WaitForConnect(void)
static DWORD WINAPI ReadFromPipeThread(LPVOID)
static int DoTelnetHandshake(int sock)
static DWORD WINAPI MonitorChildThread(LPVOID)