[Samba] Lightweight NetBIOS host enumeration in Python

christian samba at sisyphus.ch
Sat Sep 12 01:55:32 MDT 2009

On Fri, Sep 11, 2009 at 03:03:18PM -0700, Matthew Dempsky wrote:
> > what am i doing wrong?
> It looks like it can't find any master browsers on your network.  Does
> "smbtree -NS" work on this host?

yes, it does.
in some environments it works, in some others it doesn't.

> Btw, can I infer from "but on some hosts" that there are other ones
> that it does work fine? Does it successfully list all the same names
> that "smbtree -NS" does on those?

as i said - really a nice tool.

in some environment (where it woeked yesterday), though it *does* list 
most names (all but one), but:

error: trouble enumerating "MSHEIMNETZ":
Traceback (most recent call last):
  File "nbtls.py", line 50, in ?
    print group + ': ' + ', '.join(enum(bcaddr, group, ENUM_HOSTS))
  File "nbtls.py", line 33, in enum
    return smb.doit(nbs, group, what)
  File "/tmp/nbtls/smb.py", line 260, in doit
    s.connect((addr, 445))
  File "<string>", line 1, in connect
error: (111, 'Connection refused')

thanks, again.


More information about the samba mailing list