本文介绍了解密Javascript源码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了一个javascript代码并进行加密,它类似于:

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



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

请帮我解密我的源代码。



谢谢

解决方案

使用



您可以获取:



  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']();
$('#规格')['slideToggle']()
$('#UpTablnkTools')['on']('click',function(){
$('#divHelp')['slideUp']() ;
$('#规范')['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']();
$ (这个)['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');
});
});


I have been wrote a javascript code and encrypt it.it is similar to this :

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

All Code in JsFiddle

I search in the Internet and SO but no solution help me to decrypt my script.

please help me to decrypt my source code.

thanks

解决方案

By using http://jsbeautifier.org/

You may obtain:

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');
     });
 });

这篇关于解密Javascript源码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 18:54