2010-08-05 19:53:14 -04:00
|
|
|
#!/usr/bin/perl
|
2006-02-14 16:18:27 -05:00
|
|
|
use IO::Socket::INET;
|
|
|
|
|
|
|
|
my ($ip, $port, $file) = @ARGV;
|
|
|
|
|
|
|
|
$ip and $port or die "Usage $0: <ip> <port>\n";
|
|
|
|
|
|
|
|
$socket = new IO::Socket::INET->new( PeerPort => $port,
|
|
|
|
Proto => 'udp',
|
|
|
|
PeerAddr => $ip);
|
2006-03-01 17:55:28 -05:00
|
|
|
open(I, $file);
|
|
|
|
$/ = undef;
|
|
|
|
my $buf = <I>;
|
|
|
|
close(I);
|
2006-02-14 16:18:27 -05:00
|
|
|
|
2010-04-07 02:44:56 -04:00
|
|
|
$socket->send("$buf\n");
|
2006-02-14 16:18:27 -05:00
|
|
|
|