diff options
| author | Franklin Wei <git@fwei.tk> | 2015-12-24 14:57:16 -0500 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2015-12-24 14:57:16 -0500 |
| commit | 460d13ccd6242da9d25558aac6ffb7c6e9df03a6 (patch) | |
| tree | dc872bc1a5afb940ec9ca2e0ab706bee811ef7e1 /src/telnet.c | |
| parent | f1e708a631d7d5fbe6fc2f74e5f681d6a6786b4e (diff) | |
| download | netcosm-460d13ccd6242da9d25558aac6ffb7c6e9df03a6.zip netcosm-460d13ccd6242da9d25558aac6ffb7c6e9df03a6.tar.gz netcosm-460d13ccd6242da9d25558aac6ffb7c6e9df03a6.tar.bz2 netcosm-460d13ccd6242da9d25558aac6ffb7c6e9df03a6.tar.xz | |
stuff
Diffstat (limited to 'src/telnet.c')
| -rw-r--r-- | src/telnet.c | 12 |
1 files changed, 10 insertions, 2 deletions
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)); } |