IMSpector project is an Instant Messenger transparent proxy with logging capabilities. Currently it supports MSN, AIM and ICQ to different degrees. MSN is the principle protocol, as it is these days the most popular.

The only supported platform is at present Linux, but porting to different UNIXs should be trivial (the only platform-specific code is the routine which determines the original destination address).

Installation:

IMSpector must be run on the routing machine in the network. This would typically be the Linux box shoved in the corner doing NATing onto an Internet connection. System requirements are minimal, although with a large number of local users IMSpector will fork many copies of itself (a typical MSN connection can consist of a dozen or more worker processes.

Download the code, and untar. Currently there is no configure script, so you must configure the Makefile by hand (if needed) and run make. There are no dependancies beyond a working C++ compiler, unless you are planning to use the MySQL logging plugin. In this event you will also need the MySQL client libraries. Please note that v3 of MySQL will probably not work.

The Makefile, trivial that it is, contains one variable, PREFIX that you can set to the target dir of the install. The default is /usr, which is probably ok for most people.

Note that if you chagne the PREFIX value (say to /usr/local) you will need to adjust the plugin_dir config option to tell IMSpector where to look for plugins.

makesudo make install

IMSpector is capable of setuid-ing to a non root user (indeed it has no requirement to run as root, or even be started as the root user), but the install target does not currently attempt to make a special user. Thus the default config will run as the whatever use started the program. This kind of "tidying up" is on the TODO.

This will install the files as follows:

/usr/sbin/imspector - the imspector binary./usr/lib/libimspector.so - a shared library that the main program and plugins share./usr/lib/imspector/*protocolplugin.so - the protocol plugins./usr/lib/imspector/*loggingplugin.so - the logging plugins./etc/imspector.conf - an example config file, good enough for quick playing.

Note that the plugins are loaded at runtime and can use config file entries. The plugins loaded will be logged to syslog.

After compiling and installing IMSpector, the following iptables rules are required to transparently proxy the various IM ports:

Login to MSN and you should see some debug output. Finally, send someone a message and it should be logged both on the console and into a logfile within the logging directory. Rerun the program without the -d switch to force it into the background.