[jcifs] jCifs writing to Mailslots

Christopher R. Hertel crh at ubiqx.mn.org
Wed Jun 11 02:55:08 EST 2003


On Tue, Jun 10, 2003 at 04:42:54PM +0200, Sascha Teifke wrote:
> Yes, they do.

Only if there is something listening.  Even on older Windows systems, you 
need to have the WinPopup application running or the messages are not 
displayed.

There is a newer RPC-based mechanism that is more reliable, but I don't
know much about it.

There was some company (in Florida, I think) that was selling software
that would send on-screen SPAM-a-grams using the RPC technique.  The
software would connect to port 135 (which is the DCE/RPC endpoint
resolution service), and then perform an MS-RPC call to cause the popup to
happen.  Most ISPs were blocking the "normal" NBT and CIFS ports, but not 
135, so the SPAM-a-grammers were able to pop advertisements onto peoples 
Windows desktops.

Ick.

> IMHO, Netsend Messages are useful if you need to alert an amount of 
> Win32 users without installing any client software
> who needs to poll a specific network server.

Only if they're running the WinPopup application so that they can receive 
the messages.  Also, it doesn't do much for MacOS, PalmOS, or *nix users.

> One Problem is, that there is no way to send messages to a specific list of
> users at once.

Well, not unless you can retrieve a list of users in a group.  If you can
get hold of the list then you just iterate through it... but you knew
that.

> If you try to make a script that executes every single 
> "net send" to shell you often have to wait a long time
> because if a computer is turned off it may last up to a minute until it 
> returns a message. Parallel processing of "net send"s
> has made me mad - it seems like it isn't thread safe.

You could do this on a *nix box without much trouble using smbclient and 
nmblookup.  One problem with the smbclient utility is that it doesn't 
look up the name correctly (at least, that's true for the version I'm 
testing with), so you have to do the name lookup using nmblookup first.

How have you tried scripting this?

> The environment I'm working in doesn't allow me to write any kind of 
> client Software that could be installed on every client.
> So I need to use the standard unrelieable way.

Sounds typical.  What a pain.

> Sascha
> 
> Allen, Michael B (RSCH) wrote:
> 
> >Mmm, yeah. Unfortunately it's just API documentation which isn't that 
> >useful at this point.

Point.

> >Looking at a quick capture it appears as though there is no session 
> >setup or tree
> >connect at all. It's just an NBT session establishment message followed by 
> >a minimal
> >SMB the format of the actual payload is as trivial as described below.

Mailslot protocol is like this as well.  It uses port UDP/138 but formats 
messages in SMB format.  The header is almost all empty, as I recall.  
There's no NBT session request because it's UDP, not TCP.

> >This would require
> >modifying the jcifs.smb files although it would not be difficult. The 
> >question is, why
> >would one want to use this? It's a neat trick but it's not reliable. Does 
> >W2K or XP still
> >support these messages?

Backward compatibility with older Windows systems is generally, but not 
uniformly, supported.  This stuff is so touchy...

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the jcifs mailing list