public
Created

message somebody in quake.

  • Download Gist
qm.pl
Perl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/perl
use Socket;
 
 
my %server;
$server{'port'} = "27960";
$server{'host'} = (shift(@ARGV));
@message = @ARGV;
 
print "trying: $server{'host'}:$server{'port'}\n";
socket(SOCKET, PF_INET, SOCK_DGRAM, getprotobyname("udp"));
unless(gethostbyname($server{'host'})) {
print "unable to open $server{'host'}\n" }
connect(SOCKET, sockaddr_in($server{'port'}, inet_aton($server{'host'})));
send(SOCKET, "\xFF\xFF\xFF\xFFprint foo\n", 0);
print "\xFF\xFF\xFF\xFFprint \n@message\n";

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.