Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //tsforum.pl
- include_once 'ts3admin.class.php';
- include_once 'config.php';
- $ts = new ts3admin($config['teamspeak']['server_ip'], $config['teamspeak']['query_port']);
- if (!$ts->getElement('success', $ts->connect())) {
- exit("Nie udalo sie polaczyc z serwerem!".PHP_EOL);
- }
- if (!$ts->getElement('success', $ts->login($config['teamspeak']['query_login'], $config['teamspeak']['query_password']))) {
- exit("Nie udalo sie zalogowac do serwera!".PHP_EOL);
- }
- if (!$ts->getElement('success', $ts->selectServer($config['teamspeak']['voice_port'], 'port', false, $config['teamspeak']['query_name']))) {
- exit("Nie udalo sie wybrac serwera lub zmienic nazwy bota!".PHP_EOL);
- }
- $logs = fopen('logs.log', 'a');
- while (true) {
- foreach ($ts->getElement('data', $ts->clientList()) as $client) {
- $clientInfo = $ts->getElement('data', $ts->clientInfo($client['clid']));
- if (strpos($clientInfo['client_myteamspeak_id'], 'AGodZilla') || strlen($clientInfo['client_myteamspeak_id']) > 50 || strlen($clientInfo['client_nickname_phonetic']) > 25 || strpos($clientInfo['client_myteamspeak_id'], 'dolo_') || strpos($clientInfo['client_meta_data'], 'AGodZilla') || strpos($clientInfo['client_talk_request_msg'], 'AGodZilla') || strpos($clientInfo['client_description'], 'AGodZilla') || strpos($clientInfo['client_talk_request_msg'], 'AGodZilla')) {
- foreach ($ts->getElement('data', $ts->clientList()) as $item) {
- $attackerInfo = $ts->getElement('data', $ts->clientInfo($item['clid']));
- if ($attackerInfo['connection_client_ip'] == $clientInfo['connection_client_ip'] && !strpos($attackerInfo['client_myteamspeak_id'], 'AGodZilla')) {
- fwrite($logs, 'ATAKUJACY: '.date('d-m-Y H:i:s').'|'.$attackerInfo['client_country'].'|'.$attackerInfo['connection_client_ip'].'|'.$attackerInfo['client_nickname'].'|'.$attackerInfo['client_myteamspeak_id'].PHP_EOL);
- break;
- }
- }
- fwrite($logs, 'BOT: '.date('d-m-Y H:i:s').'|'.$clientInfo['client_country'].'|'.$clientInfo['connection_client_ip'].'|'.$clientInfo['client_nickname'].'|'.$clientInfo['client_myteamspeak_id'].PHP_EOL);
- $ts->banClient($client['clid'], $config['bot']['bantime'], $config['bot']['banreason']);
- }
- }
- sleep($config['bot']['interval']);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement