示例#1
0
 public function execute()
 {
     $instance = CenterBot::getInstance();
     $text = $instance->_actionRaw;
     if (execute('which elizatalk') != '') {
         echo execute('echo ' . escapeshellarg($text) . ' | elizatalk');
     }
 }
示例#2
0
 public function execute()
 {
     if (execute('which traceroute') != '') {
         echo execute('traceroute ' . escapeshellarg(CenterBot::getInstance()->_actionText));
     } else {
         echo 'Error: system comand (traceroute) not found';
     }
 }
示例#3
0
 public function execute()
 {
     $instance = CenterBot::getInstance();
     if ($instance->_actionText != '') {
         echo 'result: ' . $this->calculate($instance->_actionText);
     } else {
         echo 'syntax: calc <expression>';
     }
 }
示例#4
0
 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');
 }
示例#5
0
 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;
         }
     }
 }
示例#6
0
 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;
     }
 }
示例#7
0
 public function execute()
 {
     if (execute('which fping') != '') {
         echo execute('fping ' . escapeshellarg(CenterBot::getInstance()->_actionText));
     }
 }
示例#8
0
 public function execute()
 {
     echo execute('ping -c 3 ' . escapeshellarg(CenterBot::getInstance()->_actionText));
 }
示例#9
0
 public function execute()
 {
     $params = explode(' ', CenterBot::getInstance()->_actionText);
     echo execute('nmap -p ' . escapeshellarg($params[0]) . ' ' . escapeshellarg($params[1]));
 }
示例#10
0
<?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();