예제 #1
0
#init:~karma-internal register-events
*/
#####################################################################################################
require_once "lib.php";
require_once "switches.php";
$trailing = trim($argv[1]);
$dest = $argv[2];
$nick = $argv[3];
$alias = $argv[4];
$server = $argv[5];
if ($trailing == "register-events" and $alias == "~karma-internal") {
    register_event_handler("PRIVMSG", ":%%nick%% INTERNAL %%dest%% :~karma-internal PRIVMSG %%trailing%%");
    return;
}
$msg = "";
$flag = handle_switch($alias, $dest, $nick, $trailing, "<<EXEC_KARMA_CHANNELS>>", "~karma", "~karma-internal", $msg);
switch ($flag) {
    case 1:
        privmsg("karma enabled for " . chr(3) . "10{$dest}");
        return;
    case 2:
        privmsg("karma already enabled for " . chr(3) . "10{$dest}");
        return;
    case 3:
        privmsg("karma disabled for " . chr(3) . "10{$dest}");
        return;
    case 4:
        privmsg("karma already disabled for " . chr(3) . "10{$dest}");
        return;
    case 7:
    case 11:
예제 #2
0
exec:~sed|10|0|0|0|||||php scripts/sed.php %%trailing%% %%nick%% %%dest%% %%alias%% %%cmd%%
*/
#####################################################################################################
require_once "lib.php";
require_once "switches.php";
$trailing = rtrim($argv[1]);
$nick = $argv[2];
$dest = $argv[3];
$alias = $argv[4];
$cmd = $argv[5];
#return;
# EXPLOIT FOUND (17/05/2015): s/.*/ls/e executes an 'ls' command; s/.*/ps/e executes an 'ps' command. touch doesn't seem to work, but need to prevent the use of /e (or use awk/perl)
$delims = array("/", "#");
# cannot be alphanumeric or \
$msg = "";
$flag = handle_switch($alias, $dest, $nick, $trailing, "<<EXEC_SED_CHANNELS>>", "~sed", "~sed-internal", $msg);
switch ($flag) {
    case 0:
        return;
    case 1:
        privmsg("sed enabled for " . chr(3) . "10{$dest}");
        return;
    case 2:
        privmsg("sed already enabled for " . chr(3) . "10{$dest}");
        return;
    case 3:
        privmsg("sed disabled for " . chr(3) . "10{$dest}");
        return;
    case 4:
        privmsg("sed already disabled for " . chr(3) . "10{$dest}");
        return;
예제 #3
0
#####################################################################################################
/*
exec:~welcome|10|0|0|0|||||php scripts/welcome.php %%nick%% %%dest%% %%alias%% %%trailing%%
exec:~welcome-internal|30|0|0|1||INTERNAL|||php scripts/welcome.php %%nick%% %%dest%% %%alias%% %%trailing%%
*/
#####################################################################################################
require_once "lib.php";
require_once "weather_lib.php";
require_once "time_lib.php";
require_once "switches.php";
$nick = $argv[1];
$dest = $argv[2];
$alias = $argv[3];
$trailing = $argv[4];
$msg = "";
$flag = handle_switch($alias, $dest, $nick, $trailing, "<<EXEC_WELCOME_CHANNELS>>", "~welcome", "~welcome-internal", $msg);
switch ($flag) {
    case 1:
        privmsg("welcome enabled for " . chr(3) . "10{$dest}");
        return;
    case 2:
        privmsg("welcome already enabled for " . chr(3) . "10{$dest}");
        return;
    case 3:
        privmsg("welcome disabled for " . chr(3) . "10{$dest}");
        return;
    case 4:
        privmsg("welcome already disabled for " . chr(3) . "10{$dest}");
        return;
    case 9:
        show_welcome($nick);