TSFlood

Did you find this useful?


  • Total voters
    38

Agusanz

Active Member
Jul 18, 2015
239
153
88
Hello, i made this script that will use all server slots of a server with 200 slots or less (automatically).

I'm not responsable if you use it with another ip than 127.0.0.1 or localhost.
This was developed for testing purpose only.

I know it seems pointless, but i needed this to test another system and i dont have 200 people to help me, so...
Anyways, have fun.

Code:
<?php
require_once("TeamSpeak3/TeamSpeak3.php");
TeamSpeak3::init();
$serverIP = "127.0.0.1";
$serverPort = 9987;
$serverQueryPort = 10011;
$maxQuery = 200;
try
{
    $connect = true;
    while($connect == true)
    {
        $serverfull = true;
        $nickname = substr(md5(microtime()),rand(10,20),20);
        $ts3 = TeamSpeak3::factory("serverquery://@{$serverIP}:{$serverQueryPort}/?server_port={$serverPort}&blocking=0&nickname={$nickname}");
        $serverInfo = $ts3->getInfo();
        $maxSlots = $serverInfo["virtualserver_maxclients"];
        $clientsOnline = $serverInfo["virtualserver_clientsonline"];
        $queryOnline = $serverInfo["virtualserver_queryclientsonline"];
        $slotsReserved = $serverInfo["virtualserver_reserved_slots"];
        $slotsAvailable = $maxSlots - $slotsReserved;
        $unixTime = time();
        $realTime = date('[Y-m-d] [H:i:s]',$unixTime);
        echo $realTime."\t[INFO] Connected {$nickname} Slots: {$slotsAvailable} Online: {$clientsOnline} Query: {$queryOnline}\n";
        while($serverfull == true)
        {
            if(($slotsAvailable > $clientsOnline) && ($queryOnline <= $maxQuery))
            {
                $serverfull = false;
            }
            else
            {
                $serverInfo = $ts3->getInfo();
                $maxSlots = $serverInfo["virtualserver_maxclients"];
                $clientsOnline = $serverInfo["virtualserver_clientsonline"];
                $queryOnline = $serverInfo["virtualserver_queryclientsonline"];
                $slotsReserved = $serverInfo["virtualserver_reserved_slots"];
                $slotsAvailable = $maxSlots - $slotsReserved;
                $unixTime = time();
                $realTime = date('[Y-m-d] [H:i:s]',$unixTime);
                echo $realTime."\t[INFO] Server is full. Slots: {$slotsAvailable} Online: {$clientsOnline} Query: {$queryOnline}\n";
                sleep(1);
            }
        }
        sleep(1);
    }
}
catch(Exception $e)
{
    $unixTime = time();
    $realTime = date('[Y-m-d] [H:i:s]',$unixTime);
    die($realTime."\t[ERROR]  " . $e->getMessage() . "\n". $e->getTraceAsString() ."\n");
}

-Agusanz
 
Last edited:

panteL

Restricted
Mar 17, 2016
146
44
63
how can i activate the script? i try to use:
php test.php (test.php ist the name of this script) but it shows my the following error:
PHP Warning: require_once(TeamSpeak3/TeamSpeak3.php): failed to open stream: No such file or directory in /home/test.php on line 2
PHP Fatal error: require_once(): Failed opening required 'TeamSpeak3/TeamSpeak3.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/test.php on line 2
how must i do this? :)

edit:
It works pretty good, the path to the teamspeak.php was false :D
 
Last edited:

Derp

Retired Staff
Contributor
Apr 30, 2015
933
1,017
217
How that works? Are they real clients or just query

Line 15:
Code:
$ts3 = TeamSpeak3::factory("serverquery://@{$serverIP}:{$serverQueryPort}/?server_port={$serverPort}&blocking=0&nickname={$nickname}");
 

panteL

Restricted
Mar 17, 2016
146
44
63
Line 15:
Code:
$ts3 = TeamSpeak3::factory("serverquery://@{$serverIP}:{$serverQueryPort}/?server_port={$serverPort}&blocking=0&nickname={$nickname}");
:D i was banned with all querys because the flood :(
 

Agusanz

Active Member
Jul 18, 2015
239
153
88
Did you remove the "Sleep(1);" ?
You need to slow down the code or you will get banned because of the anti-flood.
If you keep getting banned i recommend you to increase that sleep, 2secs instead of 1.
 

panteL

Restricted
Mar 17, 2016
146
44
63
Did you remove the "Sleep(1);" ?
You need to slow down the code or you will get banned because of the anti-flood.
If you keep getting banned i recommend you to increase that sleep, 2secs instead of 1.
I will try it again, maybe I can use the general slowmode
 

Agusanz

Active Member
Jul 18, 2015
239
153
88
I will try it again, maybe I can use the general slowmode
I tested it on a 512 slots servers with default settings and increased serverinstance_serverquery_flood_commands to 50. I don't know why it keeps failing on you.
if you want to save your logs execute it like this: nohup php -f TSFlood.php &> TSFlood.log and paste your .log file here.. let's see what's happening..
 

Derp

Retired Staff
Contributor
Apr 30, 2015
933
1,017
217
I tested it on a 512 slots servers with default settings and increased serverinstance_serverquery_flood_commands to 50. I don't know why it keeps failing on you.
if you want to save your logs execute it like this: nohup php -f TSFlood.php &> TSFlood.log and paste your .log file here.. let's see what's happening..
no need to redirect output to another file, as it will automatically be logged to a newly generated nohup.out file
*just sayin'*
 

Agusanz

Active Member
Jul 18, 2015
239
153
88
no need to redirect output to another file, as it will automatically be logged to a newly generated nohup.out file
*just sayin'*
^ yeah, he's right.. nohup php -f TSFlood.php will do the job.. sorry about that.. i like to change *.log name files because i have many scripts going on.. :eek:
 

dm94

Member
May 30, 2016
6
2
35
Even if you have connected 1000 querys normal users can connect, users query use other slots
 

Agusanz

Active Member
Jul 18, 2015
239
153
88
Oh yes you can :D
Really? didn't try on the last version of ts btw.. but 2 months ago there was a query limit of 200 per instance or u would get an error like: "Query error - max clients protocol limit reached"
I dont know if u can increase that limit tbh
 

DifferentUser

Member
Feb 19, 2016
53
23
58
You are aware that Teamspeak Servers will crash with too many queries? For example bad programmed Dynamic Server Banners which will open a Queey connection to the Server
1. They are mostly whitelisted and cant get banned
2. they will send some commands which produces small load

If you find out the web adress of the banner (with Wireshark for example) then just keep your F5 key pressed (this should open hell a lot of queries) until the Server crashes
 

DifferentUser

Member
Feb 19, 2016
53
23
58
Same goes for most of the Scripts on this Forum which opens a query to the server, if you find a script which opens a query to the ts3 server then just hold F5
 
Top