Elisha (zip file containing a Windows exe)
Papers from the SecVis website:
s_daemon.c is the server program. It accepts and manages connections. It also
spawns the simple shell program, s_sh.c, to interact with each connection. It
is similar to daemon.c from Lab 4 except it spawns a
new program for the children. It uses pipes to communicate with s_sh and
select()
has been expanded to watch both the sockets and pipes.
See the function dialog_with_telnet()
for these changes.
The command to start s_daemon is:
s_daemon [-log]The optional log option will create a log, similar to daemon.c.
s_sh.c is a very simple shell. A shell is used to interact with the system. It parses commands and command options, runs them and displays the results. This program can parse a few commands such as cd, dir and pwd. It also supports one * or ? wildcard per line. The comments section at the top of the file lists more details on the capacity of this shell program.
s_tlnt.c is a simple telnet client. Some interesting things to look at in the
s_tlnt.c code are process_esc()
and the commandmode
jump target in main()
. The process_esc()
function
interprets basic VT100/ANSI escape sequences. VT100 and ANSI are standards
to control the placement of the cursor on a text screen, colors, reverse
colors, blinking text, clearing the screen and other such functionality
needed to create basic text-based graphical interfaces. If you use Pine,
you've seen VT100 and ANSI in use. The commandmode
jump target
can be reached by pressing CTRL-T (the "escape character") while the program
is running. This is the s_tlnt prompt. Your connection will still be active
in the background while you give commands to the s_tlnt program. You can
"close" an active connection, "return" to an active connection, "open" a new
connection, set s_tlnt parameters, access a "help" screen and see the "status"
at the s_tlnt prompt. The command to start s_tlnt is:
s_tlnt [-v] [-snoopy] hostname portThe v option will turn on verbose, which will give you detailed information about the execution of the program. You can also set "verbose" or "noverbose" at the s_tlnt prompt. The snoopy option activates transparent mode, which gives information about telnet arbitration and shows all control and 8bit characters. You can set "snoopy" or "nosnoopy" at the s_tlnt prompt. The hostname is the name of the host and the port is the port number given by s_daemon when you ran it.
Part 2 Questions:
s_tlnt -v -snoopy helios 23
. What
do you see?