Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class rieqyns13{
- var $user;
- var $pass;
- var $cookie;
- var $user_agent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)";
- function curl($url, $data="", $header=""){
- $ch = curl_init();
- if($data != ""){
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
- }
- if($header != ""){
- curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
- }
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_USERAGENT, $this->user_agent);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $this->cookie);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $this->cookie);
- $exec = curl_exec($ch);
- curl_close($ch);
- return $exec;
- }
- function login(){
- $data = array("action" => "do_login", "username" => $this->user, "password" => $this->pass, "loginsubmit" => "Login!");
- $login = $this->curl("http://devilzc0de.org/forum/index.php", $data, "");
- return $login;
- }
- function get_shout(){
- $get = $this->curl("http://devilzc0de.org/forum/xmlhttp.php?action=show_shouts&last_id=");
- $strip = strip_tags($get);
- $exp = explode("^--^", $get);
- $exp2 = explode("</span><br />", $exp[2]);
- $preg = preg_split("/(--)/", $exp2[0]);
- $user = strip_tags($preg[0]);
- $re_user = str_replace("» (report)", "", $user);
- $data = explode("title=", $preg[1]);
- $shout = strip_tags($data[0]);
- if(count($data)>1){
- $data_dc[2] = strip_tags(":".str_replace(array('"', '/>'), "", $data[1])); //smiles content
- }
- $data_dc[0] = trim(substr($re_user, 0, -15)); //user
- $data_dc[1] = $shout; //content
- return $data_dc;
- }
- function smiles(){
- $smile = $this->curl("http://devilzc0de.org/forum/misc.php?action=smilies&popup=true&editor=clickableEditor");
- $remove_html = strip_tags($smile);
- $pecah = explode("Click a smilie to insert it into your message", $remove_html);
- $hapus = str_replace(array("[", "]", "close window", "\n", "\r", "\r\n"), " ", $pecah[1]);
- $hapus2 = preg_replace("/\s+/", " ", $hapus);
- $smiles = explode(" ",trim($hapus2));
- return $smiles;
- }
- function simsimi($str){
- //$str2 = str_replace(":", "", $this->get_shout()[2]);
- $header = array("Host: www.simsimi.com",
- "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0",
- "Accept: application/json, text/javascript, */*; q=0.01",
- "Accept-Language: id,en-us;q=0.7,en;q=0.3",
- "Accept-Encoding: gzip, deflate",
- "Content-Type: application/json; charset=utf-8",
- "X-Requested-With: XMLHttpRequest",
- "Referer: http://www.simsimi.com/talk.htm",
- "Cookie: JSESSIONID=C0FC34FC18759A066A96F8AF45C118E4; __utma=119922954.1103205367.1366419001.1366419001.1366419001.1; __utmb=119922954.2.10.1366419001; __utmc=119922954; __utmz=119922954.1366419001.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); sagree=true",
- "Connection: keep-alive",
- "HTTP/1.1 200 OK");
- $simi = $this->curl("http://www.simsimi.com/func/req?msg=".urlencode($str)."&lc=id&sagree=true", "", $header);
- $dec = json_decode($simi, true);
- if(empty($dec)){
- $simi = "apa itu gan ? ane gak pernah denger";
- return $simi;
- }else{
- $simic = $dec['response'];
- $preg = preg_replace("/simsimi|simi|Simi|sim/", "ane", $simic);
- return $preg;
- }
- }
- function post($post){
- $data = array("action" => "add_shout", "shout_data" => $post);
- $post = $this->curl("http://devilzc0de.org/forum/xmlhttp.php", $data);
- return $post;
- }
- function log($str){
- $fp = fopen("log_dc.txt", "a");
- fwrite($fp, $str."\n");
- fclose($fp);
- }
- function bot(){
- $smiles_o = null;
- $login = $this->login();
- if(!empty($this->get_shout()[2])){
- $smile = str_replace(":", "", $this->get_shout()[2]);
- $smile_o = $this->get_shout()[2];
- }
- if($login){
- a:
- if($this->get_shout()[0] == $this->user){
- echo "tidak dapat membalas username yang sama\n";
- goto a;
- }elseif($this->get_shout()[0] != $this->user){
- $user = $this->get_shout()[0];
- $shout = trim($this->get_shout()[1]);
- $simi = $this->simsimi($shout." ".$smile);
- $smile = $this->smiles()[rand(0, count($this->smiles())-1)];
- $post = "[i]".$user." : ".$shout." ".$smile_o."[/i] > ".$simi." ".$smile."\n";
- $send = $post." (".$this->post($post).")";
- $this->log($send);
- echo $send;
- }
- }
- }
- }
- $bot = new rieqyns13;
- $bot->user = "username";
- $bot->pass = "passwiord";
- $bot->cookie = "cookie.txt";
- $a=50;
- while($a--){
- $bot->bot();
- Sleep(2);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement