debian/0000755000000000000000000000000011430167240007164 5ustar debian/control0000644000000000000000000000215611427614017010600 0ustar Source: imsniff Section: net Priority: extra Maintainer: Juan Angulo Moreno Build-Depends: debhelper (>= 6), libpcap0.8-dev, docbook-to-man Standards-Version: 3.9.1 Homepage: http://sourceforge.net/projects/im-snif/ Package: imsniff Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Simple program to log Instant Messaging activity on the network The imsniff program can be used to log IM activity on the network. It uses libpcap to capture packets and analyzes them, logging conversation, contact lists, etc. . Users connecting after imsniff is started can get pretty good results, including complete contact lists and events (displaying a name change, for example). Users already connected will be able to get the conversations, but will miss the other information. . The only required parameter is the interface name to listen to. This can be any interface that libpcap supports. A sample imsniff.conf.sample file is included. . imsniff is beta software, for now, only MSN is supported. Others could follow. . Author: Carlos Fernandez debian/source/0000755000000000000000000000000011424402347010467 5ustar debian/source/format0000644000000000000000000000001411424402347011675 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000006211424364443010222 0ustar version=3 http://sf.net/im-snif/imsniff_(.+)\.tgz debian/patches/0000755000000000000000000000000011430167354010621 5ustar debian/patches/series0000644000000000000000000000002611430067475012037 0ustar debian-changes-0.04-6 debian/patches/debian-changes-0.04-60000644000000000000000000000714411430167354014124 0ustar Description: Upstream changes introduced in version 0.04-6 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . imsniff (0.04-6) unstable; urgency=low . * Fixed: FTBFS on GNU/kFreeBSD. (Closes: #592344). Thanks Petr Salinger . The person named in the Author field signed this changelog entry. Author: Juan Angulo Moreno Bug-Debian: http://bugs.debian.org/592344 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- imsniff-0.04.orig/src/imsniff.cpp +++ imsniff-0.04/src/imsniff.cpp @@ -9,7 +9,7 @@ char debuglogdir[MAX_DIR_LENGTH+1]=""; int daemonize=0; char *currentversion = "0.04"; int data_offset = -1; -char *devname=NULL; +char *dev_name=NULL; int promisc=0; void show_help (void); @@ -516,7 +516,7 @@ int process_parms (int argc, char *argv[ { if (argv[i][0]!='-') { - strcpymalloc((u_char **) &devname, (u_char *) argv[i]); + strcpymalloc((u_char **) &dev_name, (u_char *) argv[i]); } } i++; @@ -629,8 +629,8 @@ void read_file (FILE *f) } if (strcmp ((char *) line_tokens[0], "interface")==0) { - strcpymalloc((u_char **) &devname, line_tokens[1]); - log_debug (0, "interface = %s", devname); + strcpymalloc((u_char **) &dev_name, line_tokens[1]); + log_debug (0, "interface = %s", dev_name); } } else @@ -694,7 +694,7 @@ int main (int argc, char *argv[]) printf ("Bad parameters, leaving\n"); return -1; } - if (devname==NULL) + if (dev_name==NULL) { #ifdef WIN32 printf ("A device number is required. Run with -list to get a list.\n"); @@ -732,7 +732,7 @@ int main (int argc, char *argv[]) #endif #ifdef WIN32 pcap_if_t *alldevs; - int inum = atoi (devname); + int inum = atoi (dev_name); if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) { fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); @@ -764,10 +764,10 @@ int main (int argc, char *argv[]) } /* Jump to the selected adapter */ for(d=alldevs, devnum=0; devnum< inum-1 ;d=d->next, devnum++) {;} - strcpymalloc ( (u_char **) &devname, (u_char *) d->name); + strcpymalloc ( (u_char **) &dev_name, (u_char *) d->name); #endif - log_debug (3, "Getting address and mask for device %s...",devname); - if (pcap_lookupnet(devname, &net, &mask, errbuf)==-1) + log_debug (3, "Getting address and mask for device %s...",dev_name); + if (pcap_lookupnet(dev_name, &net, &mask, errbuf)==-1) { log_debug (0, "error [%s]",errbuf); exit (-1); @@ -776,10 +776,10 @@ int main (int argc, char *argv[]) log_debug (3, "Opening device..."); #ifdef WIN32 /* At this point, we don't need any more the device list. Free it */ - dh = pcap_open (devname, 65535, promisc?PCAP_OPENFLAG_PROMISCUOUS:0, 1000, NULL, errbuf); + dh = pcap_open (dev_name, 65535, promisc?PCAP_OPENFLAG_PROMISCUOUS:0, 1000, NULL, errbuf); pcap_freealldevs(alldevs); #else - dh = pcap_open_live (devname, 65535, promisc, 1000, errbuf); + dh = pcap_open_live (dev_name, 65535, promisc, 1000, errbuf); #endif if (dh==NULL) { debian/copyright0000644000000000000000000000247411424401366011131 0ustar This package was debianized by Amaya Rodrigo Sastre on Sat, 9 Dec 2006 18:39:35 0100. It was downloaded from http://sourceforge.net/projects/im-snif/ Upstream Author: Carlos Fernandez Sanz Copyright: Copyright (C) 2003-2008, Carlos Fernandez Sanz License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is (C) 2006, Amaya Rodrigo Sastre and is licensed under the GPL version 2, see `/usr/share/common-licenses/GPL-2'. debian/imsniff.80000644000000000000000000000734711424374417010734 0ustar .\" Title: IMSNIFF .\" Author: Amaya Rodrigo Sastre .\" Generator: DocBook XSL Stylesheets v1.71.0 .\" Date: December 9, 2006 .\" Manual: .\" Source: .\" .TH "IMSNIFF" "8" "December 9, 2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" imsniff \- Simple program to log Instant Messaging activity on the network .SH "SYNOPSIS" .HP 8 \fBimsniff\fR [\fB\-cd\fR\fB\fIchatdir\fR\fR] [\fB\-dd\fR\fB\fIdebugdir\fR\fR] [\fB\-v*\fR\fB\fIverbose\fR\fR] [\fB\-p\fR\fB\fIpromisc\fR\fR] [\fB\-d\fR\fB\fIdaemonize\fR\fR] [\fB\-offset\fR\fB\fIdata_offset\fR\fR] [\fB\-help\fR\fB\fIN/A\fR\fR] [\fBinterface\fR] .SH "DESCRIPTION" .PP This manual page documents briefly the \fBimsniff\fR commands. .PP This manual page was written for the Debian(TM) distribution because the original program does not have a manual page. Instead, it has documentation in the GNU Info format; see below. .PP The \fBimsniff\fR can be used to log IM activity on the network. It uses libpcap to capture packets and analyzes them, logging conversation, contact lists, etc. .PP Users connecting after imsniff is started can get pretty good results, including complete contact lists and events (displaying a name change, for example). Users already connected will be able to get the conversations, but will miss the other information. .PP The only required parameter is the interface name to listen to. This can be any interface that libpcap supports. A sample imsniff.conf.sample file is included. .SH "OPTIONS" .PP \fB\-\-help\fR .RS 3n N/A. Display help. .RE .PP \fB\-cd\fR .RS 3n Directory where conversations will be stored. .RE .PP \fB\-dd\fR .RS 3n debugdir. Directory where logs will be stored. These logs contain debug information as well as certain MSN events. .RE .PP \fB\-v*\fR .RS 3n verbose. Debug level. The more v's (or higher the number in the config file), the more info that is dumped. For regular usage, use 1 or 2. More than that will dump a lot of useless stuff. .RE .PP \fB\-p\fR .RS 3n promisc. Put the device in promiscuous mode. .RE .PP \fB\-d\fR .RS 3n data_offset. See below. .RE .PP \fBinterface\fR .RS 3n Interface to use. .RE .SH "DATA OFFSET" .PP The offset (in this context) is the length of the datalink header when capturing packets. This is an important number because we need to skip this header when processing packets. For ethernet, this number is 14, and imsniff knows about it. If you use a different interface, you might have to help imsniff by providing the number yourself. For example: .PP imsniff ppp0 \-offset 4 .PP How do you figure out this number? The easiest way is just try different numbers (and keep your own MSN connection busy (type something) until imsniff starts dumping conversations. The number is never high anyway. A few tries should always do. .PP If you have to use this, once it's working please drop me a note telling me what interface type imsniff reported, and the offset you used. I will add this to the code so next versions don't have to be tuned manually. .SH "STATUS" .PP Beta version. Seems to work decently. .SH "SUPPORTED PROTOCOLS" .PP For now, only MSN. Others could follow. .SH "AUTHOR" .PP This manual page was written by Amaya Rodrigo Sastre for the Debian(TM) system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. .PP On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common\-licenses/GPL. .SH "AUTHOR" .PP \fBAmaya Rodrigo Sastre\fR .sp -1n .IP "" 3n Author. .SH "COPYRIGHT" Copyright \(co 2006 Amaya Rodrigo Sastre .br debian/changelog0000644000000000000000000000300011430067453011034 0ustar imsniff (0.04-6) unstable; urgency=low * Fixed: FTBFS on GNU/kFreeBSD. (Closes: #592344). Thanks Petr Salinger -- Juan Angulo Moreno Mon, 09 Aug 2010 16:41:13 -0430 imsniff (0.04-5) unstable; urgency=low * Upgrade Standards-Version 3.9.0. * Added debian/control: Depends: ${misc:Depends}. * Fixed debian/imsniff.8: typo in manpage. Thanks Matt Fischer. * Added debian/control: Homepage field. * Fixed debian/copyright: GPL generic to GPL-2. * Added debian/rules: dh_installchangelogs docs/ChangeLog. * Switch to dpkg-source 3.0 (quilt) format. -- Juan Angulo Moreno Thu, 29 Jul 2010 16:24:44 -0430 imsniff (0.04-4) unstable; urgency=low * Fixed: copyright information. (Closes: #456366) * Upgrade Debhelper to 6. -- Juan Angulo Moreno Wed, 12 Mar 2008 20:13:13 -0430 imsniff (0.04-3) unstable; urgency=low * New maintainer. (Closes: #448724). * Added debian/rules: -Wl,--as-needed in the LDFLAGS. * Upgrade Standards-Version 3.7.3. -- Juan Angulo Moreno Tue, 11 Dec 2007 13:19:38 -0430 imsniff (0.04-2) unstable; urgency=low * QA upload. * Set maintainer to QA group. * Fix broken watch file (Closes: #449914). -- Nico Golde Sun, 02 Dec 2007 18:28:43 +0100 imsniff (0.04-1) unstable; urgency=low * Initial release (Closes: #402351) * Repackaged upstream orig.tgz to get rid of windows binaries. -- Amaya Rodrigo Sastre Mon, 11 Dec 2006 18:25:15 +0100 debian/README0000644000000000000000000000764711424374376010077 0ustar IMsniff, by Carlos Fernandez, carlos.fernandez.sanz@gmail.com ------------------------------------------------------------ DESCRIPTION ----------- IMsniff is a simple program to log Instant Message activity on the network. It uses libpcap to capture packets and analyzes them, logging conversation, contact lists, etc. RUNNING (LINUX) --------------- You can configure it via command line parameters or via a file called imsniff.conf either in the current directory or in /etc. If for some reason you rename the IMsniff execute, you need to rename the config file as well. A sample imsniff.conf.sample file is included. The only required parameter is the interface name to listen to. This can be any interface that libpcap supports, such as imsniff eth0 If you use a non-ethernet interface, please read the data offset section below. For users connecting after imsniff starts running you can get pretty good results, including complete contact lists and events (display name change, for example). For users already connected you will be able to get the conversations, which is not bad, but you will miss other stuff. OTHER PARAMETERS ---------------- command line config file Description ------------------------------------------------------------ -cd chatdir Directory where conversations will be stored. -dd debugdir Directory where logs will be stored. These logs contain debug information as well as certain MSN events. -v* verbose Debug level. The more v's (or higher the number in the config file), the more info that is dumped. For regular usage, use 1 or 2. More than that will dump a lot of useless stuff. -p promisc Put the device in promiscuous mode. -d daemonize Become a daemon. -offset data_offset See below. -help N/A Display help. With no prefix interface Interface to use. DATA OFFSET ----------- The offset (in this context) is the length of the datalink header when capturing packets. This is an important number because we need to skip this header when processing packets. For ethernet, this number is 14, and imsniff knows about it. If you use a different interface, you might have to help imsniff by providing the number yourself. For example: imsniff ppp0 -offset 4 How do you figure out this number? The easiest way is just try different numbers (and keep your own MSN connection busy (type something) until imsniff starts dumping conversations. The number is never high anyway. A few tries should always do. If you have to use this, once it's working please drop me a note telling me what interface type imsniff reported, and the offset you used. I will add this to the code so next versions don't have to be tuned manually. RUNNING (WINDOWS) ----------------- Everything is like linux, except: - Instead of a device NAME you need to enter a device NUMBER. This is because device names in Windows are pretty much unreadable. In order to get the number, run the program with -list just once, i.e. imsniff -list You will get a list of available devices, with a number, a name (you will see why we don't want to use this), and a description. Just choose the correct number, and use it, like this: imsniff 2 - There is no daemon mode. If someone bothers to make imsniff a service, please send me the patches. In the meantime, it's just console mode. STATUS ------ Beta version. Seems to work decently. SUPPORTED PROTOCOLS ------------------- For now, only MSN. Others could follow. REQUIREMENTS ------------ libpcab or winpcap. debian/docs0000644000000000000000000000004311424364443010043 0ustar docs/AUTHORS docs/README docs/TODO debian/rules0000755000000000000000000000210111430072504010234 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 CFLAGS = -Wall -g LDFLAGS = -Wl,--as-needed ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir g++ $(LDFLAGS) -o imsniff src/imsniff.cpp src/util.cpp src/msn_conntrack.cpp src/msn_handlers.cpp -lpcap src/pcap_stuff.cpp touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp imsniff dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs binary-indep: build install binary-arch: build install dh_testdir dh_testroot dh_installchangelogs docs/ChangeLog dh_installdocs debian/README dh_installexamples docs/imsniff.conf.sample dh_install imsniff usr/bin/ dh_installman debian/imsniff.8 dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure debian/dirs0000644000000000000000000000001011424364443010046 0ustar usr/bin debian/compat0000644000000000000000000000000211424364443010371 0ustar 6