[Samba] Lightweight NetBIOS host enumeration in Python

Matthew Dempsky matthew at dempsky.org
Fri Sep 11 03:45:24 MDT 2009

After giving up on trying to slim down smbtree, I've seemingly worked
out enough of the NetBIOS and SMB/CIFS protocols to implement a
bare-bones replacement in Python.  At less than 500 lines, it's pretty
easy to follow, though it's very hackish and badly needs a clean
rewrite (which I'm working on now, in C).

In the mean time, if anyone's interested, the Python code's available at:


Operation is pretty basic: just unzip and then run "python nbtls.py".
The output should be comparable to "smbtree -NS".

Test reports greatly appreciated.  If output differs or nbtls crashes,
output and tcpdump pcap files would be nice too.  Off-list replies are


More information about the samba mailing list