From 460d13ccd6242da9d25558aac6ffb7c6e9df03a6 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Thu, 24 Dec 2015 14:57:16 -0500 Subject: stuff --- src/telnet.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/telnet.c') diff --git a/src/telnet.c b/src/telnet.c index 1838b45..377f5cf 100644 --- a/src/telnet.c +++ b/src/telnet.c @@ -37,7 +37,14 @@ void telnet_handle_command(const unsigned char *buf) goto found; } } - printf("??? "); + switch(c) + { + case IP: + exit(0); + default: + break; + } + printf("???: %d ", c); found: ++buf; @@ -74,8 +81,9 @@ void telnet_init(void) IAC, DONT, NAWS, IAC, WONT, STATUS, IAC, DONT, STATUS, - IAC, DO, ECHO, + IAC, DO, ECHO, IAC, WONT, ECHO, + IAC, DONT, LINEMODE, }; out_raw(init_seq, ARRAYLEN(init_seq)); } -- cgit v1.1