A fun bit of code to be able to use NET SEND in a intranet environment. You will need to enable messenger services (not the msn messenger application) on 2000/XP to get this to work
The IP can be the IP of the receving computer, or the computer name if it has one. Enter '/users' to send to all users on a network.
This is tested on an XP machine running apache / php. Should have no issues on IIS / php machines
Now... the code
By : bastien
<? if(!isset($_POST['submit'])){ show_form(); }else{ //get message if (isset($_POST['message'])){ $mess = escapeshellcmd($_POST['message']); }else{ echo "no message"; show_form(); die(); } //$ip is the ip of your friends machine...you could build a db table or array to use the name entry to find the ip if (isset($_POST['ip'])){ $ip = escapeshellcmd($_POST['ip']); }else{ echo "no ip"; show_form(); die(); } echo "NET SEND $ip $mess"; exec("NET SEND $ip $mess");
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.