Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

"net send" in unix

by Anonymous Monk
on Feb 03, 2004 at 16:51 UTC ( [id://326243]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I wish to send a "net send" type of command from Unix to Windows 2000. The purpose is to display a message box on the Windows client. The parameters being the IP address to send to and the message itself. Windows has a similar command which works as follows:"net send 10.180.4.369 a message" or "net send gbrpc4787 a message".I am not sure how or if this can be done using perl ?

Replies are listed 'Best First'.
Re: "net send" in unix
by Fletch (Bishop) on Feb 03, 2004 at 17:06 UTC

    search.cpan.org is your friend. Looking for winpopup brings up some posibilities (Filesys::SmbClientParser). Of course you always could just drive smbclient directly.

      Just to supplement, here's a sample usage...

      echo "foo on you, Windows" | smbclient -M <hostname>

      ,welchavw

Re: "net send" in unix
by Plankton (Vicar) on Feb 03, 2004 at 17:07 UTC
    You could use ssh. There are a few options here: you could look into using the Perl module Net::SSH, or just install an OpenSSH server on your windows box ( I use the OpenSSH that comes with cygwin ) and execute something like this ...
    Unix box% ssh windows_box net send 10.120.4.369 a message

    Plankton: 1% Evil, 99% Hot Gas.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://326243]
Approved by b10m
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-24 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found