public function execute() { $instance = CenterBot::getInstance(); $text = $instance->_actionRaw; if (execute('which elizatalk') != '') { echo execute('echo ' . escapeshellarg($text) . ' | elizatalk'); } }
public function execute() { if (execute('which traceroute') != '') { echo execute('traceroute ' . escapeshellarg(CenterBot::getInstance()->_actionText)); } else { echo 'Error: system comand (traceroute) not found'; } }
public function execute() { $instance = CenterBot::getInstance(); if ($instance->_actionText != '') { echo 'result: ' . $this->calculate($instance->_actionText); } else { echo 'syntax: calc <expression>'; } }
public function execute() { $instance = CenterBot::getInstance(); foreach ($instance->_modules as $key => $value) { $modules[] = $key; } $modules = implode(', ', $modules); echo "Registed Actions: {$modules}\n"; echo "Default Action: " . (class_exists('CenterBot_Module_Default') ? 'Enabled' : 'Disabled'); }
public function execute() { if (CenterBot::getInstance()->_actionText != '') { $result = $this->search(array('q' => CenterBot::getInstance()->_actionText)); echo "Insgesamt mehr als " . $result->responseData->cursor->estimatedResultCount . " Ergebnisse"; foreach ($result->responseData->results as $array) { echo "\n - " . $array->titleNoFormatting . ': ' . $array->url; } } }
public function execute() { $instance = CenterBot::getInstance(); $userlevel = $instance->checkUser(); switch ($userlevel) { case CenterBot::AUTH_SUPERADMIN: echo "Du bist als Superadmin authentifiziert"; break; case CenterBot::AUTH_ADMIN: echo "Du bist als Admin authentifiziert"; break; case CenterBot::AUTH_USER: echo "Du bist als Standardbenutzer authentifiziert"; break; case CenterBot::AUTH_IGNORE: echo "Dein Account wurde geblockt"; break; } }
public function execute() { if (execute('which fping') != '') { echo execute('fping ' . escapeshellarg(CenterBot::getInstance()->_actionText)); } }
public function execute() { echo execute('ping -c 3 ' . escapeshellarg(CenterBot::getInstance()->_actionText)); }
public function execute() { $params = explode(' ', CenterBot::getInstance()->_actionText); echo execute('nmap -p ' . escapeshellarg($params[0]) . ' ' . escapeshellarg($params[1])); }
<?php /** * PHP CenterBot for CenterIM */ require_once 'class.php'; require_once 'interface.php'; require_once 'functions.php'; // Starte Klasse $bot = CenterBot::getInstance(); // Lade alle vorhandenen Module $modules = scandir(dirname(__FILE__) . '/modules'); unset($modules[0], $modules[1]); foreach ($modules as $module) { include_once 'modules/' . $module; } // Registriere Administratoren $bot->registerSuperadmin('206092388', 'icq'); // Fuehre aktuelles Kommando aus $bot->finish();