Files
tulin-code/非对称加密-2026-08-31/实战案例-10086中国移动登录/模拟登陆.js
Whale-Fall-Code 418a0411d1 Initialize encryption and JavaScript reverse-engineering study repository
Document the project structure and setup while excluding local dependencies and IDE settings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-09 23:25:05 +08:00

38 lines
1.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const JSEncrypt = require("jsencrypt")
// function et(_0x32033c) {
// var _0x283d00 = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsgDq4OqxuEisnk2F0EJFmw4xKa5IrcqEYHvqxPs2CHEg2kolhfWA2SjNuGAHxyDDE5MLtOvzuXjBx/5YJtc9zj2xR/0moesS+Vi/xtG1tkVaTCba+TV+Y5C61iyr3FGqr+KOD4/XECu0Xky1W9ZmmaFADmZi7+6gO9wjgVpU9aLcBcw/loHOeJrCqjp7pA98hRJRY+MML8MK15mnC4ebooOva+mJlstW6t/1lghR8WNV8cocxgcHHuXBxgns2MlACQbSdJ8c6Z3RQeRZBzyjfey6JCCfbEKouVrWIUuPphBL3OANfgp0B+QG31bapvePTfXU48TYK0M5kE+8LgbbWQIDAQAB';
// var _0x1defd6 = new JSEncrypt();
// _0x1defd6['setPublicKey'](_0x283d00);
// var _0x4bd6d3 = _0x1defd6['encrypt'](_0x32033c);
// return _0x4bd6d3;
// }
function et(data) {
const key = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsgDq4OqxuEisnk2F0EJFmw4xKa5IrcqEYHvqxPs2CHEg2kolhfWA2SjNuGAHxyDDE5MLtOvzuXjBx/5YJtc9zj2xR/0moesS+Vi/xtG1tkVaTCba+TV+Y5C61iyr3FGqr+KOD4/XECu0Xky1W9ZmmaFADmZi7+6gO9wjgVpU9aLcBcw/loHOeJrCqjp7pA98hRJRY+MML8MK15mnC4ebooOva+mJlstW6t/1lghR8WNV8cocxgcHHuXBxgns2MlACQbSdJ8c6Z3RQeRZBzyjfey6JCCfbEKouVrWIUuPphBL3OANfgp0B+QG31bapvePTfXU48TYK0M5kE+8LgbbWQIDAQAB';
const encrypt_instance = new JSEncrypt();
encrypt_instance.setPublicKey(key);
return encrypt_instance.encrypt(data);
}
/*
* 非堆成加密:在加密过程中key固定,密文不固定
*
* */
const password = "admin";
console.log(et(password));
/*
* 在js环境中和实现rsa 有两种方式
* 1. rsa-node
* 2. jsencrypt
* 区别
* rsa-node: 可以自己生成密钥对,并且完成加解密
* jsencrypt: 不能自己生成密钥对,不能完成解密,只能加密(js逆向的中重点使用)
*
*
*/