/ Published in: Perl
For PC without the messenger service enabled that want to send net send messages to those that do...
Expand |
Embed | Plain Text
#!/usr/bin/perl use warnings; use strict; use Tk; use Socket; my $target_ip; my $host; my $message; my $name; my $mw = MainWindow->new; $mw->Label(-text=> 'Message:')->pack(); $mw->Label(-text=> 'Store ie n2010:')->pack(); $mw->Button(-text => "Send", -command=>sub{sendm($message, $host)})->pack(); my $target_netbios_name; my $source_netbios_name = "ITCallcentre"; my $debug = 1; sub sendm { print $message; print $host; ($message,$name) = (@_); $target_ip =inet_ntoa(inet_aton($name)); print "$target_ip"; $target_netbios_name = getNbName($target_ip, $debug); if(!$target_netbios_name){ die "No netbios name found: $@\n"; } my $success = sendMsg($target_netbios_name, $source_netbios_name, $target_ip, $message, $debug); } MainLoop;
You need to login to post a comment.
