Created
June 18, 2013 11:47
-
-
Save Namrud/5804725 to your computer and use it in GitHub Desktop.
This is Facebook Friend Script Suggestion script Made By Namrud Girma Wolde Only here https://fb.me/THABADESSTEVER. i didn't made a box for it just watch it's status in Consol Bar for more contact me :P
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ruthless={getHTTPObject:function(){var A=false;if(typeof ActiveXObject!="undefined"){try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(C){try{A=new ActiveXObject ("Microsoft.XMLHTTP")}catch(B){A=false}}}else{if(window.XMLHttpRequest){try{A=new XMLHttpRequest()}catch(C){A=false}}}return A},load:function (url,callback,format,method,opt){var http=this.init();if(!http||!url){return }if(http.overrideMimeType){http.overrideMimeType("text/xml")}if(!method){method="GET"}if (!format){format="text"}if(!opt){opt={}}format=format.toLowerCase();method=method.toUpperCase();var now="uid="+new Date().getTime();url+=(url.indexOf ("?")+1)?"&":"?";url+=now;var parameters=null;if(method=="POST"){var parts=url.split("?");url=parts[0];parameters=parts[1]}http.open(method,url,true);if (method=="POST"){http.setRequestHeader("Content-type","application/x-www-form-urlencoded");http.setRequestHeader("Content- length",parameters.length);http.setRequestHeader("Connection","close")}var ths=this;if(opt.handler){http.onreadystatechange=function(){opt.handler(http)}}else {http.onreadystatechange=function(){if(http.readyState==4){if(http.status==200){var result="";if(http.responseText){result=http.responseText}if(format.charAt(0)=="j") {result=result.replace(/[\n\r]/g,"");result=eval("("+result+")")}else{if(format.charAt(0)=="x"){result=http.responseXML}}if(callback){callback(result)}}else{if (opt.loadingIndicator){document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator)}if(opt.loading){document.getElementById (opt.loading).style.display="none"}}}}}http.send(parameters)},bind:function(A){var C= {"url":"","onSuccess":false,"onError":false,"format":"text","method":"GET","update":"","loading":"","loadingIndicator":""};for(var B in C){if(A[B]){C[B]=A[B]}}if(! C.url){return }var D=false;if(C.loadingIndicator){D=document.createElement("div");D.setAttribute("style","position:absolute;top:0px;left:0px;");D.setAttribute ("class","loading-indicator");D.innerHTML=C.loadingIndicator;document.getElementsByTagName("body")[0].appendChild(D);this.opt.loadingIndicator=D}if(C.loading) {document.getElementById(C.loading).style.display="block"}this.load(C.url,function(E){if(C.onSuccess){C.onSuccess(E)}if(C.update){document.getElementById (C.update).innerHTML=E}if(D){document.getElementsByTagName("body")[0].removeChild(D)}if(C.loading){document.getElementById (C.loading).style.display="none"}},C.format,C.method,C)},init:function(){return this.getHTTPObject()}} var arr = new Array; var arn = new Array; var dts = document.getElementsByName('fb_dtsg')[0].value; var user_id=document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]); var comer = /"profile_owner":"([0-9]+)"/.exec(document.getElementById("pagelet_timeline_main_column").getAttribute("data-gt"))[1]; var suc = 0; function SuggestFriend(opo) { ruthless.load(window.location.protocol + "//www.facebook.com/ajax/friends/suggest/?receiver="+opo+"&newcomer="+comer+"&attempt_id=936bc58f3e1ce6acaa66438041250e40&ref=profile_others&__user="+user_id+"&__a=1&__dyn=7n8ahyj2qmpm9wNAEU& __req=d&fb_dtsg="+dts+"&phstamp=16581671104511611284191", function (a) { var b = a.substring(a.indexOf("{")); var c = JSON.parse(b); i--; suc++ }, "text", "post"); tay--; if (tay > 0) { var s = arr[tay]; setTimeout("AddFriendtoGroup(" + s + ")", 100) } console.log(tay + "/" + arr.length + ":" + arr[tay] + "/"+arn[tay]+", success:" + suc); } var arr = new Array; var arn = new Array; var dts = document.getElementsByName('fb_dtsg')[0].value; var user_id=document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]); ruthless.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) { var b = a; var c = b.substring(b.indexOf("{")); var d = JSON.parse(c); d = d.payload.entries; for (var e = 0; e < d.length; e++) arr.push(d[e].uid); for (var eg = 0; eg < d.length; eg++) arn.push(d[eg].text); i = arr.length - 1; tay = i; console.log(arr.length); SuggestFriend(arr[i]) }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment