Fake serwer
Od HLDS.pl
#!/usr/bin/perl ## ## Fake Half-Life server ## ## -d4rkgr3y [grey_1999_at_mail_dot_ru] ## use IO::Socket; $log = 1; open(HANDLE, ">>hl.log") if $log; $max = 3024; $portn = 27016; $sock = IO::Socket::INET->new(LocalPort => $portn, Proto => 'udp') or die "damn: $@\n"; print "Waiting....\n"; while ($sock->recv($msg2, $max)) { my($port, $ipaddr) = sockaddr_in($sock->peername); $rhost = gethostbyaddr($ipaddr, AF_INET); print "$rhost said: $msg2\n"; ###################ping answer if($msg2=~"ping") { $msg1 = "\xFF\xFF\xFF\xFF\x6A\x00\x20\x20\x20". "\x20\x20\x20\x20\x20\x20\x20\x20\x20"; } ############################## ###################infostring if($msg2=~"infostring") { $msg1 = "\xFF\xFF\xFF\xFF\x69\x6E\x66\x6F\x73\x74\x72". "\x69\x6E\x67\x72\x65\x73\x70\x6F\x6E\x73\x65\x00". # hl-header "\x5C\x70\x72\x6F\x74\x6F\x63\x6F\x6C\x5C\x34\x36\x5C". "\x61\x64\x64\x72\x65\x73\x73\x5C\x32\x31\x32\x2E\x31". "\x35\x34\x2E\x32\x30\x38\x2E\x31\x31\x3A\x32\x37\x30". "\x31\x35\x5C\x70\x6C\x61\x79\x65\x72\x73\x5C". # protos, versions and other shit "15645". # players on the server.. "\x5C\x70\x72\x6F\x78\x79\x74\x61\x72\x67\x65\x74". "\x5C\x30\x5C\x6C\x61\x6E\x5C\x31\x5C\x6D\x61\x78\x5C". "324545". # max players "\x5C". "\x67\x61\x6D\x65\x64\x69\x72\x5C\x63\x73\x74\x72\x69\x6B". "\x65\x5C\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x5C". "CounterStrike". # game type "\x5C\x68\x6F\x73\x74\x6E\x61\x6D\x65\x5C". "chuj serw". # server name "\x5C\x6D\x61\x70\x5C". "de_chuj". # map "\x5C\x74\x79\x70\x65\x5C\x64". "\x5C\x70\x61\x73\x73\x77\x6F\x72\x64\x5C". "0". # password (1 - yes, 0 - no) "\x5C\x6F\x73\x5C". "\x6C". # ^^^ - server OS (\x6C - linux, \x77 - win32) "\x5C\x73\x65\x63\x75\x72\x65\x5C\x30\x5C\x6D\x6F\x64\x5C\x31\x5C". "\x6D\x6F\x64\x76\x65\x72\x73\x69\x6F\x6E\x5C\x31\x5C\x73\x76\x6F". "\x6E\x6C\x79\x5C\x30\x5C\x63\x6C\x64\x6C\x6C\x5C\x31\x00"; } ############################### ###################getchallenge if($msg2=~"getchallenge") { $msg1 = "\xFF\xFF\xFF\xFF\x41\x30\x30\x30\x30\x30\x30\x30\x30\x20". "0123456789". # id "\x20\x32\x0A\x00"; } ############################### #######okey, u can connect to me if($msg2=~"connect") { $msg1 = "\xFF\xFF\xFF\xFF\x42\x20\x34\x32\x39\x34\x39\x36\x37\x32\x39". "\x35\x20\x32\x33\x33\x36\x20\x22\x32\x31\x32\x2E\x31\x35\x34". "\x2E\x32\x33\x36\x2E\x32\x34\x32\x3A\x34\x32\x31\x30\x22\x00"; } ################################ print HANDLE "$msg2\n" if $log; $sock->send($msg1) or print "damn: $!\n"; } close(HANDLE) if $log;