Created
February 15, 2011 12:28
-
-
Save DimitarChristoff/827463 to your computer and use it in GitHub Desktop.
message somebody in quake.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment