4 Replies - 842 Views - Last Post: 30 October 2013 - 02:38 AM

#1 uorya_k  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 29-October 13

question how to retrive password from java script.

Posted 29 October 2013 - 10:54 AM

hi
i am having problem parssing the code and retrive the password form it .
i try to attache the html file here but i cant so this is the code


html file
<script type="text/javascript">
function c(x){ alert((document.getElementsByTagName('input')[0].value == window.location.hostname.replace(/a-f/, '%')) ? 'Good job!' : 'Too bad!'); }
</script>
Password: <input /><br />
<button onclick="c()">Check</button>



            <script>

eval(function(p, a, c, k, e, r) {
    e = function(c) {
        return c.toString(a)
    };
    if (!''.replace(/^/, String)) {
        while (c--)
            r[e(c)] = k[c] || e(c);
        k = [function(e) {
                return r[e]
            }];
        e = function() {
            return '\\w+'
        };
        c = 1
    }
    ;
    while (c--)
        if (k[c])
            p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('(1(){3 g=[\'4\',\':(/>\',\'5\',\'7 8\',\'9 a b\',\'d\'];c=1(){e((f.h(\'i\')[0].j==\'k\')?\'l!\':g[2.m(2.n()*6)])}})();', 24, 24, '|function|Math|var|booo|muhahaha||almost|there|not|even|close||nahh|alert|document||getElementsByTagName|input|value|input256|Congratz|floor|random'.split('|'), 0, {}));
(function() {
    var O_l0_ = function() {
        alert(('\u0043' + 'on\x67' + "ra\u0074\x7a\x21"));
    };
    var l01ll = function() {
        alert(("\u0062\x6f\u006f" + "o"));
    };
    var l10_ = function() {
        alert((":\x28"));
    };
    var lO0$0 = function() {
        alert(('\x6d' + 'uha\u0068' + 'a\u0068\u0061'));
    };
    var O0l_ = function() {
        alert(('almost t\x68' + "e\x72" + "e"));
    };
    var l$$1_$ = function() {
        alert(('\u006e\u006f\x74' + String.fromCharCode(32) + "e\u0076" + "e\x6e" + " \x63" + "l" + 'O'.toLowerCase() + "s\x65"));
    };
    var l1l1 = function() {
        alert(("\x6e\u0061" + "h\u0068"));
    };
    var l_10O = [l01ll, l10_, O_l0_, O0l_, lO0$0, l1l1, l$$1_$];
    var lOOO$_1 = function(OO_$1) {
        var O$01 = new Array();
        var l1001O = 256;
        for (var OOO$_ = 0x00; OOO$_ < l1001O; OOO$_++)
            O$01[(OOO$_).toString()] = OOO$_;
        var ll_$ = OO_$1[(("t\x79" + 'p' + String.fromCharCode(101))).toString()];
        var OllO_$ = 0x00;
        var O_$l1 = ('i' + String.fromCharCode(0x6E) + '\u0070' + 'ut');
        var O_$O0_O = document[(('get' + "e".toUpperCase() + 'l\x65' + 'M'.toLowerCase() + String.fromCharCode(0x65) + "n\u0074" + "s\x42\u0079" + 'TagN\x61' + 'me')).toString()](O_$l1)[(0).toString()][((String.fromCharCode(0166) + "\x61" + "lue")).toString()];
        for (var OOO$_ = 0x00; OOO$_ < l1001O; OOO$_++) {
            OllO_$ = (OllO_$ + O$01[(OOO$_).toString()] + ll_$[(("c" + 'H'.toLowerCase() + 'arCodeAt')).toString()](OOO$_ % ll_$[(('l\u0065' + String.fromCharCode(110) + String.fromCharCode(0x67) + "\u0074" + "h")).toString()])) % l1001O;
            O$01[(OOO$_).toString()] ^= O$01[(OllO_$).toString()];
            O$01[(OllO_$).toString()] ^= O$01[(OOO$_).toString()];
            O$01[(OOO$_).toString()] ^= O$01[(OllO_$).toString()];
        }
        OOO$_ = OllO_$ = l1001O - l1001O;
        var O1__10_ = '';
        var l010l$;
        for (var l1$0l_ = OOO$_; l1$0l_ < O_$O0_O[(('\x6c' + 'E'.toLowerCase() + 'ngt' + "H".toLowerCase())).toString()]; l1$0l_ += 2) {
            OOO$_ = (OOO$_ + 0x01) % l1001O;
            OllO_$ = (OllO_$ + O$01[(OOO$_).toString()]) % l1001O;
            O$01[(OOO$_).toString()] ^= O$01[(OllO_$).toString()];
            O$01[(OllO_$).toString()] ^= O$01[(OOO$_).toString()];
            O$01[(OOO$_).toString()] ^= O$01[(OllO_$).toString()];
            O1__10_ += String[(("fromCh" + String.fromCharCode(0141) + "\x72" + "Co\u0064" + 'e')).toString()](parseInt(O_$O0_O[(('s\u0075' + "b\u0073" + String.fromCharCode(0164) + String.fromCharCode(0162))).toString()](l1$0l_, parseInt('10', 2)), 020) ^ O$01[((O$01[(OOO$_).toString()] + O$01[(OllO_$).toString()]) % l1001O).toString()]);
        }
        var O_10l = l1001O % 10;
        var lO0$ = O1__10_[(("c\x68" + 'ar' + "c".toUpperCase() + 'O'.toLowerCase() + "deA" + String.fromCharCode(parseInt('312', 6)))).toString()](O1__10_[(('ch\x61' + "r" + 'c'.toUpperCase() + String.fromCharCode(0157) + 'D'.toLowerCase() + 'eAt')).toString()](0x00) % O1__10_[(("leng" + "T".toLowerCase() + "h")).toString()]) % O_10l;
        if (O1__10_ != O_$l1 + l1001O && lO0$ == O_10l / 0x02 - 01)
            lO0$++;
        l_10O[(lO0$).toString()]();
    };
    var l_1$l = document[(('getEle\u006d' + 'en\x74' + String.fromCharCode(0163) + '\x42\x79' + "Ta\u0067" + "Na" + String.fromCharCode(0x6D) + '\u0065')).toString()](('B'.toLowerCase() + "\u0075" + "t\u0074" + 'on'))[(0x00).toString()];
    if (typeof (l_1$l[(("a\x64" + 'dE\u0076\u0065' + "N".toLowerCase() + 'tL\x69' + 'st\x65\u006e' + 'er')).toString()]) != typeof (lOOO$_1)) {
        l_1$l[(("a\x74" + 'tac\x68' + "E" + 'V'.toLowerCase() + "ent")).toString()](('o' + "N".toLowerCase() + 'c\u006c\x69' + String.fromCharCode(0x63) + String.fromCharCode(0153)), lOOO$_1);
    } else {
        l_1$l[(("\x61" + 'dd\x45' + "ve" + String.fromCharCode(0156) + "t\x4c" + 'i' + String.fromCharCode(115) + "\u0074" + "E".toLowerCase() + "N".toLowerCase() + "\u0065\x72")).toString()](('\u0063' + "L".toLowerCase() + 'i\u0063' + 'k'), lOOO$_1, true);
    }
    l_1$l = document[(("\u0067" + 'etE' + String.fromCharCode(108) + "eme\u006e\u0074\u0042" + "y" + 'i'.toUpperCase() + "d")).toString()](("u\x72" + 'ch' + String.fromCharCode(0151) + 'n'));
    l_1$l[(("P".toLowerCase() + "\x61" + "R".toLowerCase() + 'E'.toLowerCase() + 'ntN' + String.fromCharCode(0157) + "\x64\u0065")).toString()][(('remo\u0076\u0065' + "C\u0068" + 'i\x6c' + 'D'.toLowerCase())).toString()](l_1$l);
    c = function() {
    };
})();
</script>


any help or explain how it works will be gr8.

Is This A Good Question/Topic? 0
  • +

Replies To: question how to retrive password from java script.

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9096
  • View blog
  • Posts: 34,155
  • Joined: 12-June 08

Re: question how to retrive password from java script.

Posted 29 October 2013 - 11:45 AM

Quote

i am having problem parssing the code and retrive the password form it .

Please provide more detail on this.
Was This Post Helpful? 0
  • +
  • -

#3 CasiOo  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1391
  • View blog
  • Posts: 3,078
  • Joined: 05-April 11

Re: question how to retrive password from java script.

Posted 29 October 2013 - 03:54 PM

Haha wat
Was This Post Helpful? 0
  • +
  • -

#4 uorya_k  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 29-October 13

Re: question how to retrive password from java script.

Posted 30 October 2013 - 12:36 AM

its a html file
that i take the java script from it .

in the html file there is a line of password and u need to guss it.

when u pres the button to send the password it calls to a java script function

and do some manipulation on it .

i try to understand whats going on there ?
Was This Post Helpful? 0
  • +
  • -

#5 uorya_k  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 29-October 13

Re: question how to retrive password from java script.

Posted 30 October 2013 - 02:38 AM

u can see the same problen for this guy
he posted here http://stackoverflow...llowing-js-code
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1