Blame samples/README

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