简体   繁体   中英

Encrypted JavaScript

My friend passed me this script that performs some kind of "rename" functionality.
Can you decrypt this JavaScript?

var _0x6b54=["\x63\x6C\x69\x63\x6B","\x2E\x72\x65\x6E\x61\x6D\x65\x2D\x69\x63\x6F\x6E","\x66\x69\x6E\x64","\x76\x61\x6C","\x69\x6E\x70\x75\x74\x5B\x74\x79\x70\x65\x3D\x74\x65\x78\x74\x5D","\x41\x74\x74\x61\x63\x63\x6F","\x6E\x6F\x6E\x20\x69\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x6F\x20\x5B","\x68\x74\x6D\x6C","\x23\x73\x65\x72\x76\x65\x72\x44\x61\x74\x65","\x20","\x23\x73\x65\x72\x76\x65\x72\x54\x69\x6D\x65","\x5D","\x69\x6E\x70\x75\x74\x5B\x74\x79\x70\x65\x3D\x62\x75\x74\x74\x6F\x6E\x5D","\x65\x61\x63\x68","\x2E\x71\x75\x69\x63\x6B\x65\x64\x69\x74"];$(_0x6b54[14])[_0x6b54[13]](function (_0x9cd2x1,_0x9cd2x2){$(_0x9cd2x2)[_0x6b54[2]](_0x6b54[1])[_0x6b54[0]]();var _0x9cd2x3=$(_0x9cd2x2)[_0x6b54[2]](_0x6b54[4])[_0x6b54[3]]();if(_0x9cd2x3==_0x6b54[5]){$(_0x9cd2x2)[_0x6b54[2]](_0x6b54[4])[_0x6b54[3]](_0x6b54[6]+$(_0x6b54[8])[_0x6b54[7]]()+_0x6b54[9]+$(_0x6b54[10])[_0x6b54[7]]()+_0x6b54[11]);} ;$(_0x9cd2x2)[_0x6b54[2]](_0x6b54[12])[_0x6b54[0]]();} );

The code deobfuscates as follows:

$('.quickedit').each(function (index, element) { 
  $(element).find('.rename-icon').click();
  var value = $(element).find('input[type=text]').val();

  if(value == 'Attacco') {
    $(element).find('input[type=text]').val('non identificato [' + $('#serverDate').html() + ' ' + $('#serverTime').html() + ']');
  };

  $(element).find('input[type=button]').click();
});

It's a simple renaming obfuscation and you reverse it yourself simply by stepping through the code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM