Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link rel="stylesheet" type="text/css" href="clientscript/vbulletin_important.css?v=383" />
- <link rel="stylesheet" type="text/css" href="estilo.css" />
- <center>
- <h3>The Rebels acesso remoto 1.0</h3>
- <?php
- /********************************************************************************************************
- *** Comunidade BUGS 83 no orkut ***
- *** http://www.orkut.com.br/Community?cmm=83 ***
- *** ***
- *** Criado por Papadópolis e colaboradores ***
- *** Se copiar, mantenha os créditos ***
- *** Contato via msn: papadopolis_@live.com ***
- *** Todas as funções da classe estão explicadas no próprio source ***
- *** Para usar em modo simples, basta editar as variáveis $login e $senha da classe TheRebels ***
- *** Não se esqueça de editar também a varíavel constante 'BOT' que é definida no início da página ***
- *** ex: TheRebels::$login = "meu login"; TheRebels::$senha = "minha senha"; ***
- *** ***
- *********************************************************************************************************/
- ob_start();
- session_start("TheRebels"); //inicia a sessão TheRebels com suas respectivas variáveis
- define("TR","http://therebels.biz/",true);
- class TheRebels {
- public static $login;
- public static $senha;
- public static $cookie;
- private static $regexp = array(
- "/set-cookie: (bbsessionhash=.*?);/i" //0
- );
- /*
- $regexp[0]: primeira regexp da função estática 'login' da classe TheRebels
- $regexp[1]: regexp para capturar todos os fóruns da index
- */
- private static function curl(array $parametros) {
- $ch = curl_init();
- curl_setopt_array($ch,
- array (
- CURLOPT_REFERER => "http://www.google.com.br",
- CURLOPT_URL => $parametros[0],
- CURLOPT_RETURNTRANSFER => $parametros[1],
- CURLOPT_COOKIE => $parametros[2],
- CURLOPT_HEADER => $parametros[3],
- CURLOPT_NOBODY => $parametros[3],
- CURLOPT_COOKIESESSION => 0,
- CURLOPT_CUSTOMREQUEST => ($parametros[4])?"POST":"GET",
- CURLOPT_POSTFIELDS => $parametros[4],
- )
- );
- (string) $g = curl_exec($ch);
- return $g;
- curl_close($ch);
- }
- public static function login() {
- (string) $var = null;
- $var .= "do=login";
- $var .= "&s=";
- $var .= "&securitytoken=guest";
- $var .= "&vb_login_username=".self::$login;
- $var .= "&vb_login_md5password=".md5(self::$senha);
- $var .= "&vb_login_md5password_utf=";
- $var .= "&vb_login_password=".md5(self::$senha);
- (string) $login = self::curl(array(TR."login.php?do=login",1,null,1,$var));
- return array($login);
- }
- public static function sessao(array $parametros) {
- preg_match(self::$regexp[0],$parametros[0],$cookie);
- $_SESSION["cookie"] = $cookie[1];
- self::$cookie = $cookie[1];
- return (string) $cookie[1];
- }
- public static function local(array $parametros) {
- (string) $local = null;
- (string) $html = null;
- if($parametros[1]) $parametros[0].="?{$parametros[1]}";
- $request = self::curl(array(TR.$parametros[0],1,self::$cookie,($parametros[2])?1:0,null));
- $request = preg_replace("/\n/","",$request);
- preg_match_all("/(<table class=\"tborder\".*?>.*?)<table class=\"tborder\"/i",$request,$tables);
- for($i=0;$i<count($tables[1]);$i++) {
- $html.=$tables[1][$i]."</table><br>\n";
- }
- return $html;
- }
- }
- /*
- class DOM extends TheRebels {
- public static $resultado;
- public function novo() {return new DOMDocument();}
- public static function GetHTML($elemento) {
- foreach($elemento->childNodes as $elementoTAG) {
- $elementoDOM = self::novo();
- $elemento = $elementoDOM->createElement($elementoTAG->tagName);
- for($i=0;$i<$elementoTAG->attributes->length;$i++)
- $elemento->setAttribute($elementoTAG->attributes->item($i)->name,$elementoTAG->attributes->item($i)->value);
- $elemento->nodeValue = $elementoTAG->nodeValue;
- echo $elemento->nodeValue;
- $elementoDOM->appendChild($elemento);
- self::$resultado .= $elementoDOM->saveHTML();
- }
- return self::$resultado;
- }
- }
- */
- //definindo login e senha
- TheRebels::$login = "muda";
- TheRebels::$senha = "muda";
- //if(isset($_SESSION["cookie"]) && $_SESSION["cookie"]!==null) {//verifica se a variável de sessão 'cookie' ainda está viva.
- //se estiver, ele apenas seta a variável estática 'cookie' com o valor igual a variável 'cookie' da sessão
- //isso evita de fazer login toda vez que o usuário entrar na página
- TheRebels::$cookie = $_SESSION["cookie"];
- //} else { //caso não esteja, ele faz login no site
- //efetuando login
- $login = TheRebels::login();
- //definindo cookies de sessão
- TheRebels::sessao($login);
- //}
- /*
- A função 'local' da classe TheRebels (que pode ser chamada como TheRebels::local()) tem como parâmetro uma array contento alguns valores, estes valores são:
- array('parametro1','parametro2',parametro3)
- parametro1 - [TIPO STRING] url do TheRebels, ex: http://therebels.biz/index.php
- parametro2 - [TIPO STRING] são as variáveis do tipo GET da url, ex: f=1&t=220
- parametro3 - [TIPO BOLEANO] caso o valor seja true, a função irá retornar apenas os headers da página, caso false, irá retornar o código fonte HTML da página
- exemplo de chamado:
- echo TheRebels::local(array("http://therebels.biz/showthread.php","t=221163",null));
- */
- echo TheRebels::local(array("index.php",null,null));
- ob_flush();
- flush();
- ?>
- </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement