-1

我已经编写了一个 javascript 代码并对其进行加密。它与此类似:

var _0xbf1b = ["\x2F\x70\x61\x67\x65\x73\x2F", "\x69\x6E\x64\x65\x78\x4F\x66", "\x74\x6F\x4C

JsFiddle 中的所有代码

我在互联网上搜索,但没有解决方案可以帮助我解密我的脚本。

请帮我解密我的源代码。

谢谢

4

2 回答 2

2

这称为混淆的 JavaScript。它没有加密,只是更难阅读。您可以尝试 JSBeautifier ( http://jsbeautifier.org/ ) 使其更具可读性。

于 2013-04-03T07:33:55.480 回答
0

通过使用http://jsbeautifier.org/

您可以获得:

http://jsfiddle.net/VFNVx/

 function getAlarm() {
     try {
         var _0xdca7x2 = window['location'].toString()['toLowerCase']()['indexOf']('/pages/');
         var _0xdca7x3 = window['location'].toString()['substring'](0, _0xdca7x2) + '/pages/Alarm/Alarm.aspx/GetAlarm';
         $['ajax']({
             type: 'POST',
             url: _0xdca7x3,
             data: '{}',
             contentType: 'application/json; charset=utf-8',
             dataType: 'json',
             success: function (_0xdca7x4) {
                 if (_0xdca7x4['d'] != '') {
                     var _0xdca7x5 = _0xdca7x4['d']['split']('_');
                     $('#hidAlarmID')['val'](_0xdca7x5[0]);
                     $('#lblAlarmMessage')['text'](_0xdca7x5[1]);
                     if (parseInt(_0xdca7x5[0]) > 0) {
                         $('#pnlAlarm')['slideDown']();
                     } else {
                         $('#pnlAlarm')['slideUp']();
                     };
                 };
             }
         });
     } catch (e) {};
 };
 $(document)['ready'](function () {
     $('body')['on']('click', '.NotpostBack', function (_0xdca7x6) {
         _0xdca7x6['preventDefault']();
     });
     $('#UpTablnkUserName')['on']('click', function () {
         $('#divTools')['slideUp']();
         $('#divHelp')['slideUp']();
         $('#Specifications')['slideToggle']();
     });
     $('#UpTablnkTools')['on']('click', function () {
         $('#divHelp')['slideUp']();
         $('#Specifications')['slideUp']();
         $('#divTools')['slideToggle']();
     });
     $('#UpTablnkHelp')['on']('click', function () {
         $('#divTools')['slideUp']();
         $('#Specifications')['slideUp']();
         $('#divHelp')['slideToggle']();
     });
     if ($('#lblAlarmMessage')['text']() != '' && parseInt($('#hidAlarmID')['val']()) > 0) {
         $('#pnlAlarm')['slideDown']();
     };
     window['setInterval']('getAlarm()', 300000);
     $('#btnAware')['on']('click', function (_0xdca7x6) {
         try {
             _0xdca7x6['preventDefault']();
             var _0xdca7x2 = window['location'].toString()['toLowerCase']()['indexOf']('/pages/');
             var _0xdca7x3 = window['location'].toString()['substring'](0, _0xdca7x2) + '/pages/Alarm/Alarm.aspx/Aware';
             $['ajax']({
                 type: 'POST',
                 url: _0xdca7x3,
                 data: '{\'MessageID\':\'' + $('#hidAlarmID')['val']() + '\'}',
                 contentType: 'application/json; charset=utf-8',
                 dataType: 'json',
                 success: function (_0xdca7x4) {
                     if (_0xdca7x4['d'] == true) {
                         $('#pnlAlarm')['slideUp']();
                     };
                 }
             });
         } catch (_0xdca7x6) {};
     });
     $('#pnlAlarm')['on']('click', function () {
         $('#pnlAlarm')['slideUp']();
     });
     $('#menuUL li')['on']('mouseenter', function () {
         var _0xdca7x7 = $(this)['position']();
         $(this)['find']('ul')['css']('top', _0xdca7x7['top'] + 28);
         if (jQuery['browser']['version'] == '7.0' || jQuery['browser']['version'] == '8.0') {
             $(this)['find']('ul')['css']('left', _0xdca7x7['left'] - 105 - $(document)['scrollLeft']());
         } else {
             $(this)['find']('ul')['css']('left', _0xdca7x7['left'] - 105);
         };
         $(this)['find']('ul')['css']('top', _0xdca7x7['top'] + 27 - $(document)['scrollTop']());
         $(this)['find']('ul')['css']('position', 'fixed');
         $(this)['find']('ul')['css']('display', 'block');
     });
     $('#menuUL li')['on']('mouseleave', function () {
         $(this)['find']('ul')['css']('display', 'none');
     });
 });
于 2013-04-03T07:35:14.703 回答