首页 > 其他分享 >今日份JS解密日志

今日份JS解密日志

时间:2022-12-14 17:00:21浏览次数:51  
标签:const msgInput JS 解密 InputTipsMsg let 日志 sendLock previousSibling

今天拿到手的JS加密源代码如下

function enterKeyDown(_0x28623b) {
const _0x32979d = _0x58fe;
const _0xde64a8 = _0x1d66;
try {
let _0x1f57e5 = msgInput['previousSibling'];
let _0x595e47 = _0x1f57e5['value'];
sendLock = ![];
if ((msgInput['childNodes'][0x2cf1a ^ 0x2cf1a]['nodeName'] === _0xde64a8(0x98, '(Vjy') || msgInput['innerHTML']['indexOf'](_0x32979d(0x1f)) === (0x3995f ^ 0x3995f)) && msgInput['childNodes']['length'] !== 0x1) {
InputTipsMsg(_0xde64a8(0xa9, 'K^s['), _0xde64a8(0x7f, 'xtHf'));
return;
}
if (!__DisableSendTT) {
if (!IsEmpty(_0x595e47)) {
InputTipsMsg(_0x32979d(0xa1), _0x32979d(0xa8));
TranslateMessagesDirectly(_0x595e47, function (_0x37519a) {
const _0x4c0c26 = _0x58fe;
const _0x504cb8 = _0x1d66;
let _0x1b155d = GetRetStr(_0x37519a);
if (_0x1b155d['indexOf'](_0x504cb8(0x6d, 'epCC')) === 0x0) {
sendLock = ![];
InputTipsMsg(_0x37519a['msg'] === undefined ? _0x4c0c26(0x90) : _0x37519a['msg'], _0x4c0c26(0x1c));
} else {
_0x1f57e5['value'] = _0x1b155d;
msgInput['innerHTML'] = _0x1b155d;
FireMessageInputEvent(_0x1f57e5);
sendLock = !![];
setTimeout(() => {
const _0x1313e1 = _0x58fe;
sendLock = ![];
if (hasChinese(msgInput['innerText']) && zh_translation_switch === ![]) {
} else {
sendButton['click']();
InputTipsMsg(_0x1313e1(0x9b), _0x1313e1(0xa8));
}
}, 0x1);
}
}, send_from, send_to);
}
} else {
setTimeout(() => {
const _0x133bc1 = _0x1d66;
const _0xe44700 = _0x58fe;
sendLock = ![];
InputTipsMsg(_0xe44700(0x6a), _0x133bc1(0x73, 't)Zd'));
sendButton['click']();
}, 0x808b2 ^ 0x808b8);
}
} catch (_0x21b8b7) {
sendLock = ![];
console['error'](_0x21b8b7);
}
}

我手工解密后如下

function enterKeyDown() {
try {
let previousSibling = msgInput.previousSibling;
let psValue = previousSibling.value;
sendLock = false;

if ((msgInput.childNodes[0].nodeName === "IMG" || msgInput.innerHTML.indexOf("<img") === 0) && msgInput.childNodes.length !== 1) {
InputTipsMsg("表情不能在最前面翻译", "error");
return;
}

if (!__DisableSendTT) {
if (!IsEmpty(psValue)) {
InputTipsMsg("正在翻译中", "info");
TranslateMessagesDirectly(psValue, function (res) {
let retStr = GetRetStr(res);

if (retStr.indexOf("error:") === 0) {
sendLock = false;
InputTipsMsg(res.msg === undefined ? "服务错误" : res.msg, "error");
} else {
previousSibling.value = retStr;
msgInput.innerHTML = retStr;
FireMessageInputEvent(previousSibling);
sendLock = true;
setTimeout(() => {
sendLock = false;

if (!(hasChinese(msgInput.innerText) && zh_translation_switch === false)) {
sendButton.click();
InputTipsMsg("翻译成功", "info");
}
}, 1);
}
}, send_from, send_to);
}
} else {
setTimeout(() => {
sendLock = false;
InputTipsMsg("未开启翻译,发送原文", "info");
sendButton.click();
}, 10);
}
} catch (e) {
sendLock = false;
console.error(e);
}
}

解密思路

1.咱们解密啥都不用想,首先将加密的JS代码丢到​在线JS加密解密工具站​一键解一遍。

2.在工具站解完了后,人工分析代码加密逻辑手工挨个改回来

3.解密完毕

结论

这个我看了下,这个js应该是翻译某游戏客户端的说明注释的,将英文版的客户端数据通过调用翻译接口翻译成汉语,应该是某些人想把国外的开源代码搬运进来,初步做一个汉译。

标签:const,msgInput,JS,解密,InputTipsMsg,let,日志,sendLock,previousSibling
From: https://blog.51cto.com/u_15781271/5937852

相关文章

  • JS-关于地址栏传中文参数乱码的解决办法
    A.html<!DOCTYPEhtml><html> <head> <metacharset="UTF-8"> <title></title> </head> <body> </body> <scripttype="text/javascript"> //这是第一个页面......
  • commonJS, AMD, CMD区别表格对比
    1、对比总览  名称    同步/异步   规范文件 应用场景加载速度描述commonJS同步CommonJSNODEJS平均加载速度最慢最早版本的js模块化编程规范......
  • 基于jsp+sevlet+spring+mysql实现校园疫情防控管理信息系统
    @目录一、系统介绍二、采用技术及开发环境1.开发技术2.开发环境二、功能展示1.学校疫情统计2.各情况统计3.各学院学生情况统计4.各学院教师统计5.最新时报6.后台管理四、代......
  • jsp+sevlet+mysql图书管理系统
    @目录一、系统介绍二、功能展示1.图书查询(学生)2.借阅信息(学生)3.借阅历史(学生)4.借阅历史(管理员)5.读者管理(管理员)6.图书分类(管理员)7.图书借阅信息(管理员)8.图书......
  • @RequestBody中传递json里的对象,对象包含list属性,对应body里的格式
    以下就是对应格式,直接复制进接口文档相关工具即可{"userId":"88","openCostCenterDTO":[{"name":"大斯温例果取向","co......
  • Nodejs学习 2 -- events事件处理EventEmitter
    EventEmitter类模块:events源码:events.jsEventEmitter类,是node中事件的基础,实现了事件模型需要的接口,包括addListener,removeListener,emit及其ta工具方法.同原生ja......
  • 第九章 JSP标签
    Shiro提供了JSTL标签用于在JSP/GSP页面进行权限控制,如根据登录用户显示相应的页面按钮。  导入标签库<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"......
  • SpringBoot入门系列:Spring Security 和 Angular JS(1)
    SpringSecurity和AngularJS系列,是一文的解析。受保护的单页面应用程序这一节我们要展示将SpringSecurity、SpringBoot和AngularJS放在一起使用的一些不错的特性,它......
  • SpringBoot入门系列:Spring Security 和 Angular JS(2)
    添加动态的内容目前我们已经有了一个应用程序,硬编码了一句问候语在里面。这对学习如何把这些凑到一起很有帮助,不过实际上我们期望的是来自于后台服务器的内容,因此我们可以创......
  • execCommand(), js
    execCommand()方法是执行一个对当前文档,当前选择或者给出范围的命令。处理Html数据时常用document.execCommand(sCommand[,交互方式,动态参数])sCommand:sCommand为指令......