Requirement: libpcap0.7; your Kernel support (CONFIG_PACKET, for Kernels >= 2.2, according green report below; or attached an interface in promiscuous mode on Kernel < 2.2).
frog:~# grep CONFIG_PACKET=[my] /boot/config-2.6.8-2-386 ; [ $? = 0 ] && echo "Kernel `uname -a`: Supports pcap"Check the installed libpcap0.7:
CONFIG_PACKET=m
Kernel Linux frog 2.6.8-2-386 #1 Thu May 19 17:40:50 JST 2005 i686 GNU/Linux: Supports pcap
frog:~# dpkg -l | grep pcapFor compiling netpack package by your own you will need libpcap0.7-dev, but if you download a binary package of netpack you will not need this.
ii libpcap0.7 0.7.2-7 System interface for user-level packet captu
ii libpcap0.7-dev 0.7.2-7 Development library and header files for lib
ii libpcap0.8 0.9.5-1 System interface for user-level packet captu
frog:~# ldconfig -p | grep pcap
libpcap.so.0.8 (libc6) => /usr/lib/libpcap.so.0.8
libpcap.so.0.7 (libc6) => /usr/lib/libpcap.so.0.7
frog:~# file ~guest/gpackcount_static
/home/guest/gpackcount_static: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, stripped
Supose your Debian box is connecting a share in a windowzed host, via Samba-client.
frog:~# mount -t smbfsThis indicates a share called huge is mounted locally at /net/luisa/huge. You can sniff the raw-text transfer protocol (NetBIOS, in particular microsoft-ds) using the following command:
//luisa/huge on /net/luisa/huge type smbfs (rw)
~guest/gpackcount_static packets -g 445,0,0,445 -vIn my case the windowzed PC has a replica of my Freesco-box (moreira.dnsalias.org/linux), and I synch information regularly from the Freesco-box to this PC using a Debian guest (named frog). I use rsync (that is actually also installed at the Freesco-box, though this is only a nice-to-have: it improves even more the transfer speed) -- rsync is the Rolls Royce of a synchronization tool. It also allows compressed file-transfer (using '-z'). In the following example you can see a folder named 'linux' transferred to the PC using the Samba share.
frog:~# grep smbfs /etc/fstabThe bold line is the customized Samba client I have configured on the Debian host.
//luisa/huge /net/luisa/huge smbfs rw,noauto,username=henrique,password=your_windowzed_pass 0 0
frog:~# mount /net/luisa/huge
frog:~# cd /net/luisa/huge/pub/public_html/org/linux
frog:/net/luisa/huge/pub/public_html/org/linux# rsync -v -v -t -r --stats root@maxtor:/www/org/linux . 2> /tmp/rep
Be sure to have the 'smbfs' package installed, otherwise the mount command will fail (apt-get install smbfs).
Note: I am currently a little bit skeptic about the 'lfs' option on the Samba client.
The rsync command is shown above.The gpackcount will show the file-transfer contents, excluding the mounting.

2 comments:
Last sentence: "excluding the mounting process..." => I am currently learning the Samba usage of port 139 against 445...
libpcap is now part of netpack-gpack!
Post a Comment