fadhiilrachman

[FIX] Script Bot Reaction V2

Aug 28th, 2016
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3.  
  4. * BOT REACTION Versi 2
  5. * BOT TANGGAP STATUS
  6. Versi 2
  7. * Created By: Endo Sulistio
  8. * FB: https://facebook.com/100002167444279
  9. * E-mail: edocyberar1@gmail.com
  10. *** NOTE , Cukup edit bagian data login dan pilih type reaction sesuka hati kamuh, Masukan password dan email kamu. ***
  11.  
  12. ****** EDIT SESUKA HATI KALIAN, ASALKAN JANGAN GANTI NAMA PEMBUAT ******
  13. * Terimakasih
  14. * Covered By Wangur Team
  15. *** New **
  16. * Fix Curl
  17. * Type Reaction
  18. * Tambahan Kopling
  19. * Dan Menggunakan Karbu PA 15
  20. * Plus Akrapovic Sebagai Lobang Hembusan Angin
  21. * Siap Untuk Menggeber Performa :D
  22.  
  23. */
  24. ########## TYPE REACTION ##########
  25. $koplinge=array(
  26. /*
  27. (+) Pilih type reaction
  28. (+) true : untuk mengaktifkan.
  29. (+) false : untuk menonektifkan
  30. (+) JANGAN true SEMUA ! PILIH SALAH SATU AJA !!
  31. */
  32.       'suka' => false,
  33.        'super' => false,
  34.         'haha' => false,
  35.          'wow' => false,
  36.           'sedih' => false,
  37.            'marah' => true,
  38. //SEGERA//
  39. 'botLikeKomen' => 'Tunggu, Saya Mau Katokan Dulu :D',
  40.  
  41.   );
  42.  
  43. $bot = new bot($wangur);
  44. $bot-> kopling=$koplinge;
  45.  
  46. class bot{
  47. private $wangur;
  48. public $kopling;
  49. function __construct($dataLog){
  50.  //Data Login
  51.   $this->pass = 'PASSWORD';
  52.    $this->email = 'EMAIL';
  53.     }
  54.  
  55.  
  56. private function get_contents($url,$type=null,$fields=null){
  57.    $opts = array(
  58.             42 => false,
  59.             19913 => 1,
  60.             10002 => $url,
  61.             52 => false,
  62.             10018 => 'Opera/9.80 (Series 60; Opera Mini/6.5.27309/34.1445; U; en) Presto/2.8.119 Version/11.10',
  63.            78 => 5,
  64.            13 => 5,
  65.            47 => false,
  66.             );
  67.    $ch=curl_init();
  68.    if($type){
  69.        if($type == 1){
  70.               $opts[10082] = 'coker_log';
  71.               }
  72.        if($type == 3){
  73.               $opts[42] = false;
  74.              
  75.              }
  76.        $opts[10031] = 'coker_log';
  77.     }
  78.   if($fields){
  79.       $opts[47] = false;
  80.       $opts[10015] = $fields;
  81.       }
  82.    curl_setopt_array($ch,$opts);
  83.    $result = curl_exec($ch);
  84.    curl_close($ch);
  85.    return $result;
  86.   }
  87.  
  88.  
  89. public function home(){
  90.    $url = $this->getUrl('m','home.php');
  91.    $getToken = $this->get_contents($url,3);
  92.    $konten = strstr($getToken,'class="_3-8w">');
  93.    $ft_id = explode('/reactions/picker/',$konten);
  94.    $limit=count($ft_id);
  95.  echo'<b>Type Reaction: '.$this->ubah($this->kopling,true).'</b><hr>';
  96.  
  97. for($i=0; $i<=$limit; $i++){
  98. $id=$this->cut($ft_id[$i],'ft_id=','&');
  99.  echo $id;
  100.        if($id){
  101.        if($this->getLog($id)){
  102.      
  103.         echo'<font color="green">[ Ok ]</font>';
  104.           $this -> getReaction($id);
  105.            }else{
  106.        echo' <font color="red">Success..</font>';
  107.   }
  108. echo'<br>';
  109. }
  110. }
  111.  
  112.    }
  113.  
  114. private function saveFile($x,$y){
  115.    $f = fopen($x,'w');
  116.         fwrite($f,$y);
  117.         fclose($f);
  118.    }
  119. private function getUrl($domain,$dir,$uri=null){
  120.     if($uri){
  121.          foreach($uri as $key =>$value){
  122.              $parsing[] = $key . '=' . $value;
  123.                 }
  124.              $parse = '?' . implode('&',$parsing);
  125.                 }
  126.      return 'https://' . $domain . '.facebook.com/' . $dir . $parse;
  127.        }
  128.  
  129. public function cut($content,$start,$end){
  130. if($content && $start && $end) {
  131. $r = explode($start, $content);
  132. if (isset($r[1])){
  133. $r = explode($end, $r[1]);
  134. return $r[0];
  135. }
  136. return '';
  137. }
  138. }
  139.  
  140. public function getReaction($edo){
  141. $gerr ='https://mobile.facebook.com/reactions/picker/?ft_id='.$edo;
  142.     echo'<br>';
  143.     $sukaa= $this->get_contents($gerr,3);
  144.     $suka= $this->cut($sukaa,'tanggapan</h1>','<div id="static');
  145.     $ha= explode('/ufi/reaction/',$suka);
  146.     $liha= count($ha);
  147.   // echo $suka;
  148.  
  149. for($hai=0; $hai<=$liha; $hai++){
  150.   $getha= $this -> cut($ha[$hai],$this->ubah($this->kopling,false),'"');
  151.    
  152.     if($getha){
  153.       $hajarm='https://mobile.facebook.com/ufi/reaction/?ft_ent_identifier='.$edo.'&amp;reaction_'.$this->ubah($this->kopling,false).''.$getha;
  154.       $hajar= str_replace('&amp;','&',$hajarm);
  155. //   echo $hajar;
  156.       echo'<br>';
  157.       echo $this->get_contents($hajar,3);
  158.      
  159.     }
  160. }
  161. }
  162. public function ubah($rem,$info){
  163.  if($rem[suka]=='true'){
  164.  $tipe='type=1'; $anu='Suka';
  165.   }else if($rem[super]=='true'){
  166.    $tipe='type=2'; $anu='Super';
  167.     }else if($rem[haha]=='true'){
  168.      $tipe='type=0'; $anu='Haha';
  169.       }else if($rem[wow]=='true'){
  170.        $tipe='type=3'; $anu='Wow';
  171.         }else if($rem[sedih]=='true'){
  172.          $tipe='type=7'; $anu='Sedih';
  173.           }else if($rem[marah]=='true'){
  174.            $tipe='type=8'; $anu='Marah';
  175.             }
  176.          if($info=='true'){
  177.         return $anu;
  178.       }else{
  179.     return $tipe;
  180.   }
  181. }
  182.  
  183. public function getLog($y){
  184.    if(file_exists('log.txt')){
  185.        $log=file_get_contents('log.txt');
  186.        }else{
  187.        $log=' ';
  188.        }
  189.  
  190.   if(ereg($y,$log)){
  191.        return false;
  192.        }else{
  193. if(strlen($log) > 5000){
  194.    $n = strlen($log) - 5000;
  195.    }else{
  196.   $n= 0;
  197.    }
  198.        $this->saveFile('log.txt',substr($log,$n).' '.$y);
  199.        return true;
  200.       }
  201.  }
  202.  
  203. public function login(){
  204.   $login = array(
  205.      'pass' => $this -> pass,
  206.      'email' => $this -> email,
  207.      'login'  => 'Login',
  208.              );
  209.   $this->get_contents($this->getUrl('m','login.php'),1,$login);
  210.    }
  211.  
  212. }
  213.  
  214. if($bot->home()){
  215.     echo $bot->home();
  216.     }else{
  217.     $bot->login();
  218.     }
  219.  
  220. ?>
Add Comment
Please, Sign In to add comment