GOSTRA_FX

BOT Like Beranda By ZakirDotID

Feb 3rd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3.     Coded By Muhammad Zakir Ramadhan (c)
  4.     Bot CLI Versi 1.2
  5.     Indonesian Coders
  6.     Jangan Ngaku Recode Kalau Cuman Ubah Nama :)
  7. */
  8. error_reporting(0);
  9. $SET = array();
  10. $SET['token'] = "TOKEN ANDA";
  11. $SET['limit'] = "10";
  12. $SET['react'] = 1; /* 0 LIKE | 1 LOVE | 2 HAHA | 3 WOW | 4 SAD | 5 ANGRY */
  13. $SET['delay'] = 5;
  14. $SET['ulang'] = true;
  15. $SET['bot_komen'] = false; /* true bot aktif dan false bot mati */
  16. $SET['grab_token'] = true; /* true untuk aktif dan false untuk mati */
  17. $SET['bomb_react'] = false;
  18. $komennya = array("Hai @nama@!\nJika dalam cinta kau mainkan sebuah drama, kelak kau harus siap untuk menjadi pemeran utama dalam sebuah karma.\n-bot","@nama@ Tatapanmu memanglah sederhana, namun dapat mengalihkan dunia.\n-bot","Jika rindu ibarat uang, mungkin aku sudah menjadi orang terkaya di dunia karena telah menanggung rindu padamu.\n-bot","@nama@ Aku dan kamu bagaikan ambulan tanpa wiu uiwu xixixixi \n-bot"); /* Setting Di Sini Kata2nya */
  19. banner();
  20. version();
  21. echo " Memeriksa Token Anda......\n";
  22. if(cek_token()==1){
  23. sleep(1);
  24. echo " Token Hidup! Bot Beraksi..............\n";
  25. $me = me();
  26. echo " Welcome  ".utf8_decode($me['name'])." [ ".$me['id']." ] \n";
  27. if($SET['ulang'] == true){
  28.     while (true) {
  29.         gass();
  30.         sleep($SET['delay']);
  31.     }
  32. } else {
  33.     gass();
  34. }
  35. } else {
  36.     echo " Token Anda Mati! Apakah Anda Mau Generate Token Baru? (y/n) :";
  37.     if($SET['grab_token']==true){
  38.     $y = trim(fgets(STDIN));
  39.     if($y == "y" or $y == "Y"){
  40.         $token = grabtoken();
  41.         echo " Token Anda Adalah -> ".$token."\n";
  42.         exit();
  43.     } else {
  44.         echo " Good Bye! Thanks For Using My Tools!\n By ZakirDotID\n";
  45.         exit();
  46.     }
  47.     } else {
  48.         echo " Good Bye! Thanks For Using My Tools!\n By ZakirDotID\n";
  49.         exit();
  50.     }
  51. }
  52. function gass(){
  53.     global $SET,$komennya;
  54.     $status = getStatus();
  55.     $reaksi = array("LIKE","LOVE","HAHA","WOW","SAD","ANGRY");
  56.     $react_type = $reaksi[$SET['react']];
  57.     echo " Total Thread ( ".count($status['data'])." )\n";
  58.     sleep($SET['delay']);
  59.     foreach ($status['data'] as $key => $data) {
  60.         $id_post = $data['id'];
  61.         $from = utf8_decode($data['from']['name']);
  62.         $type = $data['type'];
  63.         $token = $SET['token'];
  64.         $ids = explode("_", $id_post);
  65.         $ids = $ids[1];
  66.         echo " [{$ids}] React {$react_type} Status Si {$from} ";
  67.         sleep($SET['delay']);
  68.         $url = "https://graph.facebook.com/v2.11/{$id_post}/reactions?";
  69.         $post = "type={$react_type}&access_token={$token}&method=post";
  70.         $respon = _curl($url,$post);
  71.         $result = json_decode($respon,true);
  72.         if($result['success']){
  73.             echo " Sukses ";
  74.             if($SET['bot_komen'] == true){
  75.                 $kata = $komennya[array_rand($komennya)];
  76.                 $kata = str_replace("@nama@", $from, $kata);
  77.                 $kata = $kata."\n";
  78.                 $kata = urlencode($kata);
  79.                 $kirim_kata = file_get_contents("https://api.facebook.com/method/stream.addComment?post_id={$id_post}&comment={$kata}&access_token={$token}");
  80.                 if(preg_match("/stream_addComment_response/", $kirim_kata)){
  81.                     echo " ( Sukses Komen ) :p\n";
  82.                 } else {
  83.                     echo " ( Gagal Komen ) :(\n";
  84.                 }
  85.             } else {
  86.                 echo "\n";
  87.             }
  88.            
  89.         } else {
  90.             echo " Gagal\n";
  91.         }
  92.         sleep(5);
  93.     }
  94. }
  95. function grabtoken(){
  96.     echo " Input Username : ";
  97.     $username = trim(fgets(STDIN));
  98.     echo " Input Password : ";
  99.     $password = trim(fgets(STDIN));
  100.     echo " Mengirim Repond Ke server....\n";
  101.     $url = "https://getliker.net/login/gettoken.php";
  102.     $data = "u={$username}&p={$password}";
  103.     $respond = _curl($url,$data);
  104.     preg_match("/src=\"(.*)\"/", $respond , $token);
  105.     $get = json_decode(file_get_contents($token[1]),true);
  106.     return $get['access_token'];
  107. }
  108. function cek_token(){
  109.     global $SET;
  110.     $token = $SET['token'];
  111.     $respond = json_decode(file_get_contents("https://graph.facebook.com/me?access_token={$token}&fields=name,id"),true);
  112.     if($respond['name']){
  113.         return 1;
  114.     } else {
  115.         return 0;
  116.     }
  117. }
  118. function getStatus()
  119. {
  120.     global $SET;
  121.     return json_decode(file_get_contents("https://graph.facebook.com/v2.1/me/home?fields=id,from,type,message&limit=".$SET['limit']."&access_token=".$SET['token']),true);
  122. }
  123. function _curl($url,$data)
  124. {
  125.     $curl = curl_init();
  126.     curl_setopt($curl, CURLOPT_URL, $url);
  127.     curl_setopt($curl, CURLOPT_CONNECTTIMEOUT,20);
  128.     curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31');
  129.     curl_setopt($curl, CURLOPT_COOKIE,'cookie.txt');
  130.     curl_setopt($curl, CURLOPT_COOKIEFILE,'cookie.txt');
  131.     curl_setopt($curl, CURLOPT_COOKIEJAR,'cookie.txt');
  132.     curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
  133.     curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 3);
  134.     curl_setopt($curl, CURLOPT_HEADER, 0);
  135.     curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
  136.     curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
  137.     curl_setopt($curl,CURLOPT_FOLLOWLOCATION,true);
  138.     $result = curl_exec($curl);
  139.     if(!$result){
  140.         echo "Retry 5s....\n";sleep(5);
  141.     }
  142.     return $result;
  143.     curl_close($curl);
  144. }
  145. function me(){
  146.     global $SET;
  147.     return json_decode(file_get_contents("https://graph.facebook.com/v2.1/me?access_token=".$SET['token']),true);
  148. }
  149. function banner(){
  150. echo "
  151. ------------------------------------------------------------------------------
  152.     ___                  __             __ __           __            __
  153.    /   |  _______  __   / /   ____     / //_/__  ____  / /_____  ____/ /
  154.   / /| | / ___/ / / /  / /   / __ \   / ,< / _ \/ __ \/ __/ __ \/ __  /
  155.  / ___ |(__  ) /_/ /  / /___/ /_/ /  / /| /  __/ / / / /_/ /_/ / /_/ /  
  156. /_/  |_/____/\__,_/  /_____/\____/  /_/ |_\___/_/ /_/\__/\____/\__,_/  
  157.  
  158. ------------------------------------------------------------------------------
  159. --------------------------[ Powered By ZakirDotID ]---------------------------
  160. ";
  161. }
  162. function version(){
  163.     if (!file_exists("bot_zakir.version")) {
  164.         $data = "Bot Zakir V.1.3\r\nHak Cipta!";
  165.         @file_put_contents("bot_zakir.version", $data);
  166.         return 0;
  167.     } else {
  168.         $get = file_get_contents("bot_zakir.version");
  169.         preg_match("/Bot Version (.*)/", $get , $r);
  170.         echo "Bot Version ".$r[1]. "\n";
  171.     }
  172. }
Add Comment
Please, Sign In to add comment