Advertisement
Guest User

Untitled

a guest
Feb 16th, 2018
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.15 KB | None | 0 0
  1. <?php
  2. class Reaction
  3. {
  4. function __construct()
  5. {
  6. }
  7. ////////////// [alternatif file_get_contents] ///////////////
  8. private function url_get_contents ($Url)
  9. {
  10. if (!function_exists('curl_init')){
  11. die('CURL is not installed!');
  12. }
  13. $ch = curl_init();
  14. curl_setopt($ch, CURLOPT_URL, $Url);
  15. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  16. $output = curl_exec($ch);
  17. curl_close($ch);
  18. return $output;
  19. }
  20. /////////////////////////////////////////////////////////////
  21. private function fetch_value($str, $find_start, $find_end)
  22. {
  23. $start = strpos($str, $find_start);
  24. if ($start === false) {
  25. return "";
  26. }
  27. $length = strlen($find_start);
  28. $end = strpos(substr($str, $start + $length), $find_end);
  29. return trim(substr($str, $start + $length, $end));
  30. }
  31. private function curl($url = '', $var = '',$echo = '',$ref = '',$header = false)
  32. {
  33. global $config, $sock;
  34. $curl = curl_init($url);
  35. curl_setopt($curl, CURLOPT_NOBODY, $header);
  36. curl_setopt($curl, CURLOPT_TIMEOUT, 150);
  37. curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0');
  38. if ($var) {
  39. curl_setopt($curl, CURLOPT_POST, true);
  40. curl_setopt($curl, CURLOPT_POSTFIELDS, $var);
  41. }
  42. curl_setopt($curl, CURLOPT_COOKIEFILE, $config['cookie_file']);
  43. curl_setopt($curl, CURLOPT_COOKIEJAR, $config['cookie_file']);
  44. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
  45. curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
  46. curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
  47. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  48. $result = curl_exec($curl);
  49. curl_close($curl);
  50. return $result;
  51. }
  52. private function gender_check($userid,$token)
  53. {
  54. $gen_url = 'https://graph.facebook.com/'.$userid.'?access_token='.$token;
  55. $gen_data = file_get_contents($gen_url);
  56. $gen_data = json_decode($gen_data, true);
  57. $gender = $gen_data['gender'];
  58. return $gender;
  59. }
  60. public function send_reaction($user, $pass, $token, $r_male, $r_female, $max_status)
  61. {
  62. $get_post = 'https://graph.facebook.com/me/home?fields=id,from&limit='.$max_status.'&access_token='.$token;
  63. $get_post = file_get_contents($get_post);
  64. $get_post = json_decode($get_post, true);
  65. foreach($get_post['data'] as $data)
  66. {
  67. $this->curl("https://mobile.facebook.com/login.php?refsrc=https%3A%2F%2Fm.facebook.com%2F&login_try_number=1", "lsd=AVpI36s1&version=1&ajax=0&width=0&pxr=0&gps=0&dimensions=0&m_ts=1483804348&li=qg5xWAUZXopBIK0ABg1Dtlzt&email=$user&pass=$pass&login=Masuk");
  68. $stat_id = $data['id'];
  69. $post_id = explode("_",$stat_id);
  70. $r_start = 'https://mobile.facebook.com/reactions/picker/?ft_id='.$post_id[1];
  71. $html = $this->curl($r_start);
  72. $html = str_replace('&amp;','&',$html);
  73.  
  74. if ($user_gen == 'female')
  75. {
  76. $r_females = '/ufi/reaction/?ft_ent_identifier='.$post_id[1].'&reaction_type='.$r_female;
  77. $r_female_e = $this->fetch_value($html,$r_females,'" style="display:block">');
  78. $r_female_l = 'https://mobile.facebook.com/ufi/reaction/?ft_ent_identifier='.$post_id[1].'&reaction_type='.$r_female. $r_female_e;
  79. $this->curl($r_female_l);
  80. echo "\e[05m\e[36mStatus ID $post_id[1] => Reacted\n";
  81. }else{
  82. $r_males = '/ufi/reaction/?ft_ent_identifier='.$post_id[1].'&reaction_type='.$r_male;
  83. $r_male_e = $this->fetch_value($html,$r_males,'" style="display:block">');
  84. $r_male_l = 'https://mobile.facebook.com/ufi/reaction/?ft_ent_identifier='.$post_id[1].'&reaction_type='.$r_male. $r_male_e;
  85. $this->curl($r_male_l);
  86. echo "\e[05m\e[36mStatus ID $post_id[1] => Reacted\n";
  87. }
  88. $this->curl('https://mobile.facebook.com/logout.php');
  89. sleep(2);
  90. }
  91. }
  92. }
  93. //////////////////////////////////////////////[edit authentication here]///////////////////////////////////////////
  94. system("clear");
  95. echo "\e[05m\e[93m
  96. ____ _ _____ ____
  97. | __ ) ___ | |_ | ___| __ )
  98. | _ \ / _ \| __| | |_ | _ \
  99. | |_) | (_) | |_ | _| | |_) |
  100. |____/ \___/ \__| |_| |____/
  101.  
  102. \e[91m[x]=============\e[91m[-\e[00m-]\e[00m=============[x]\e[05m\e[36m
  103. Author : Mr.Java404
  104. Code : PHP
  105. Team : BlackHole Security
  106. Version : 1.2.3
  107. Date : 14-02-2018
  108. [x]1 = Like, 2 = Love, 3 = Haha
  109. [x]4 = Wow, 5 = Sad, 6 = Angry
  110. \e[91m[x]=============\e[91m[-\e[00m-]\e[00m=============[x]";
  111. echo "\n\e[05m\e[36mReaction Male : ";
  112. $r_male=trim(fgets(STDIN, 1024));
  113. echo "Reaction Female : ";
  114. $r_female=trim(fgets(STDIN, 1024));
  115. echo "Username/ID FB : ";
  116. $user=trim(fgets(STDIN, 1024));
  117. echo "Password FB : ";
  118. $pass=trim(fgets(STDIN, 1024));
  119. echo "Maximum Status : ";
  120. $max_status=trim(fgets(STDIN, 1024));
  121. echo "Your FB Token : ";
  122. $token=trim(fgets(STDIN, 1024));
  123. echo "\nBot is running...\nPress volume down + c to stop\n";
  124. echo "\e[94m[x]==============================[x]\n";
  125. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  126. $config['cookie_file'] = 'cookie-bot.txt';
  127. if (!file_exists($config['cookie_file'])) {
  128. $fp = @fopen($config['cookie_file'], 'w');
  129. @fclose($fp);
  130. }
  131. $reaction = new Reaction();
  132. $reaction->send_reaction($user, $pass, $token, $r_male, $r_female, $max_status);
  133. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement