Blame samples/README

Packit 16808d
Packit 16808d
These samples demonstrate how to do a few things with the Meanwhile
Packit 16808d
library. Some of these are also tools which can be used to help in
Packit 16808d
debugging and obtaining protocol information.
Packit 16808d
Packit 16808d
Packit 16808d
Examples
Packit 16808d
========
Packit 16808d
Packit 16808d
 socket.c
Packit 16808d
Packit 16808d
Compile with `./build socket`. This is the simplest possible
Packit 16808d
client. All it does is connect and authenticate to a host (specified
Packit 16808d
on the command line). Most of the code is dedicated to performing I/O.
Packit 16808d
Packit 16808d
Packit 16808d
 sendmessage.c
Packit 16808d
Packit 16808d
Compile with `./build sendmessage`. Expands upon socket.c to send a
Packit 16808d
message via the IM service after login, then immediately logs off and
Packit 16808d
exits.
Packit 16808d
Packit 16808d
Packit 16808d
 echo.c  (forthcoming)
Packit 16808d
Packit 16808d
Compile with `./build echo`. This extends on the socket example above,
Packit 16808d
but introduces the use of the IM service. All incoming messages will
Packit 16808d
be echo'd verbatim back at whomever sends them. Can anger co-workers.
Packit 16808d
Packit 16808d
Packit 16808d
 pipe.c  (forthcoming)
Packit 16808d
Packit 16808d
Compile with `./build pipe`. Extending upon the echo example, but is
Packit 16808d
slightly more amusing and can be possibly useful for scripting. Will
Packit 16808d
output all incoming IM messages to stdout. Listens on stdin and will
Packit 16808d
write each line from stdin back to anyone who sent us a message
Packit 16808d
(responding in order received)
Packit 16808d
Packit 16808d
Since this application uses stdout, glib logging is smothered.
Packit 16808d
Packit 16808d
Packit 16808d
 blist_storage.c  (forthcoming)
Packit 16808d
Packit 16808d
Compile with `./build blist_storage`. An example of the Storage
Packit 16808d
service and buddy list parser. Operates in two modes, up and down. In
Packit 16808d
up mode, this sample will read a buddy list file on stdin, check it
Packit 16808d
for validity, then upload it to the storage service. In down mode,
Packit 16808d
this sample will fetch the buddy list from the storage service and
Packit 16808d
write it to stdout.
Packit 16808d
Packit 16808d
Since this application uses stdout, glib logging is smothered.
Packit 16808d
Packit 16808d
Packit 16808d
Utilities
Packit 16808d
=========
Packit 16808d
Packit 16808d
 redirect_server.c
Packit 16808d
Packit 16808d
Compile with `./build redirect_server`. Acts as a redirecting sametime
Packit 16808d
server; any client attempting to connect to the socket this utility
Packit 16808d
listens on will be instructed to redirect its connection to an
Packit 16808d
alternative host (which is specified on the command line). Useful for
Packit 16808d
ensuring client code can handle redirects correctly when there's no
Packit 16808d
real redirecting server to test against.
Packit 16808d
Packit 16808d
Packit 16808d
 nocipher_proxy.c
Packit 16808d
Packit 16808d
Compile with `./build nocipher_proxy`. Acts as a sametime server
Packit 16808d
proxy, passing messages between a real client and server. However, it
Packit 16808d
will intercept and mangle channel creation messages to ensure that
Packit 16808d
they will not be used with encryption. This will cause many clients to
Packit 16808d
fail in strange places (where they demand encryption), but is useful
Packit 16808d
for getting some messages from a service in the clear. Will print all
Packit 16808d
messages in hex pairs to stdout using the hexdump utility. This may be
Packit 16808d
more useful than using ethereal, as it will actually group its output
Packit 16808d
by message rather than by receipt from the TCP stream.
Packit 16808d
Packit 16808d
Packit 16808d
 login_server.c
Packit 16808d
Packit 16808d
Compile with `./build login_server`. Acts as a sametime server; any
Packit 16808d
client attempting to connect to the socket this utility listens on
Packit 16808d
will be able to complete handshaking and send a login message. The
Packit 16808d
tool then analyzes the authentication method and data and prints the
Packit 16808d
decrypted data to stdout. This was useful for reverse-engineering the
Packit 16808d
RC2/128 auth method (and determining what one of the guint32 fields of
Packit 16808d
the handshake ack was for). Probably not very useful for anything
Packit 16808d
else.
Packit 16808d
Packit 16808d
Packit 16808d
 logging_proxy.c
Packit 16808d
Packit 16808d
Compile with `./build logging_proxy`. Acts as a sametime server proxy,
Packit 16808d
passing messages between a real client and server. However, it will
Packit 16808d
intercept and mangle channel data in order to obtain the unencrypted
Packit 16808d
data. This should be invisible to both the client and the server. Will
Packit 16808d
print all messages in hex pairs to stdout using the hexdump utility,
Packit 16808d
and will print decrypted contents of encrypted channel messages
Packit 16808d
separately. This is certainly more useful than using ethereal, as it
Packit 16808d
groups its output by message as well as provides an unencrypted view
Packit 16808d
of otherwise obscured service protocols.