7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Including
use IO::Socket::INET;
## Scriptoptions
$| = 1; # disable output buffering
## Config
%config = (
SERVER => "193.192.58.21",
PORT => 27000,
PASSWORD => "cordon",
VERSION => "v0.1a",
);
## Baue Socketverbindung auf
$Sock = IO::Socket::INET->new(
Proto => "udp",
PeerAddr => $config{"SERVER"},
PeerPort => $config{"PORT"},
) or die("Konnte keine Verbindung zum Server aufbaun.");
$line= $Sock->send("\xff\xff\xff\xffchallenge rcon\n");
if ($line =~ /challenge +rcon +(\d+)/)
{
$command="changelevel de_dust2";
$msg = "\xFF\xFF\xFF\xFFrcon $1 \"$config('PASSWORD')\" $command\0\n";
$line = $Sock->send($msg);
}
Quotesrv17f16-41:/home/phantom # perl -W PGRconBot.pl
srv17f16-41:/home/phantom #
$config('PASSWORD')
$config{PASSWORD}
$config('PASSWORD')
$config{PASSWORD}
$config('PASSWORD')
7 Einträge, 1 Seite |