增加猿人学第14题-备而后动-勿使有变代码

This commit is contained in:
luzhisheng 2024-01-11 14:37:55 +08:00
parent dc8318bfcb
commit 5832f2d467
13 changed files with 8094 additions and 18906 deletions

View File

@ -1,220 +0,0 @@
window = this;
catvm = {};
// 补环境的自定义方法通过toString方法被检测
(() => {
'use strict';
const $toString = Function.toString
const myFunction_toString_symbol = Symbol('('.concat('', ')_', (Math.random() + '').toString(36)))
const myToString = function () {
return typeof this == 'function' && this[myFunction_toString_symbol] || $toString.call(this)
};
function set_native(func, key, value) {
Object.defineProperty(func, key, {
"enumerable": false,
'configurable': true,
'writable': true,
'value': value
})
}
delete Function.prototype['toString'];// 删除原型链上的toString
set_native(Function.prototype, 'toString', myToString);// 自己定义一个getter方法
// 套娃给 toString 方法设置一个 toString
set_native(Function.prototype.toString, myFunction_toString_symbol, 'function toString(){ [native code] }')
catvm.safefunction = (func) => {
set_native(func, myFunction_toString_symbol, `function ${myFunction_toString_symbol, func.name || ''}() { [native code] }`)
}
}).call(this);
const Navigator = function Navigator() {
throw new TypeError('Illegal constructor')
};
catvm.safefunction(Navigator);
Object.defineProperties(Navigator.prototype, {
[Symbol.toStringTag]: {
value: 'Navigator',
configurable: true,
}
});
Object.getOwnPropertyDescriptor_ = Object.getOwnPropertyDescriptor;
Object.getOwnPropertyDescriptor = function (tag, val) {
// tag[Symbol.toStringtag]
if (tag.toLocaleString() == '[object Navigator]') {
return undefined;
}
return Object.getOwnPropertyDescriptor_.apply(this, arguments)
};
////////////////原型-补环境-start////////////////
Navigator.prototype.appCodeName = "Mozilla";
Navigator.prototype.appName = "Netscape";
Navigator.prototype.appVersion = "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36";
Navigator.prototype.connection = {onchange: null, effectiveType: '3g', rtt: 300, downlink: 1.3, saveData: false};
Navigator.prototype.cookieEnabled = true;
Navigator.prototype.doNotTrack = null;
Navigator.prototype.geolocation = {};
Navigator.prototype.hardwareConcurrency = 8;
Navigator.prototype.language = "zh-CN";
Navigator.prototype.languages = ['zh-CN', 'zh', 'en'];
Navigator.prototype.maxTouchPoints = 0;
Navigator.prototype.mediaCapabilities = {};
Navigator.prototype.mediaSession = {metadata: null, playbackState: 'none'};
Navigator.prototype.mimeTypes = {0: 'MimeType', 1: 'MimeType', 'application/pdf': 'MimeType', 'text/pdf': 'MimeType', length: 2};
Navigator.prototype.onLine = true;
Navigator.prototype.permissions = {};
Navigator.prototype.platform = "Win32";
Navigator.prototype.plugins = "";
Navigator.prototype.product = "Gecko";
Navigator.prototype.productSub = "20030107";
Navigator.prototype.userActivation = {hasBeenActive: false, isActive: false};
Navigator.prototype.userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36";
Navigator.prototype.vendor = "Google Inc.";
Navigator.prototype.vendorSub = "";
Navigator.prototype.webkitPersistentStorage = {};
Navigator.prototype.webkitTemporaryStorage = {};
////////////////原型-补环境-end//////////////////
// 解决实例可以调用属性,但是原型对象不能调用属性
navigator = {};
navigator.__proto__ = Navigator.prototype;
// 遍历原型
for (let prototype_ in Navigator.prototype) {
// 将所有原型属性值赋值给实例属性值
navigator[prototype_] = Navigator.prototype[prototype_];
// hook所有的get属性值返回报错Illegal constructor
Navigator.prototype.__defineGetter__(prototype_, function () {
throw new TypeError('Illegal constructor')
})
}
const Screen = function Screen() {
throw new TypeError('Illegal constructor')
};
catvm.safefunction(Screen);
Object.defineProperties(Screen.prototype, {
[Symbol.toStringTag]: {
value: 'Screen',
configurable: true,
}
});
////////////////补环境-start////////////////
Screen.prototype.availHeight = 824;
Screen.prototype.availLeft = 0;
Screen.prototype.availTop = 0;
Screen.prototype.availWidth = 1536;
Screen.prototype.colorDepth = 24;
Screen.prototype.height = 864;
Screen.prototype.orientation = {angle: 0, type: 'landscape-primary', onchange: null};
Screen.prototype.pixelDepth = 24;
Screen.prototype.width = 1536;
////////////////补环境-end//////////////////
screen = {};
screen.__proto__ = Screen.prototype;
// 遍历原型
for (let prototype_ in Screen.prototype) {
// 将所有原型属性值赋值给实例属性值
screen[prototype_] = Screen.prototype[prototype_];
// hook所有的get属性值返回报错Illegal constructor
Screen.prototype.__defineGetter__(prototype_, function () {
throw new TypeError('Illegal constructor')
})
}
const Location = function Location() {
throw new TypeError('Illegal constructor')
};
catvm.safefunction(Location);
Object.defineProperties(Location.prototype, {
[Symbol.toStringTag]: {
value: 'Location',
configurable: true,
}
});
location = {};
location.ancestorOrigins = {length: 0};
location.assign = '';
location.hash = '';
location.host = 'match.yuanrenxue.cn';
location.hostname = 'match.yuanrenxue.cn';
location.href = 'https://match.yuanrenxue.cn/match/14';
location.origin = 'https://match.yuanrenxue.cn';
location.pathname = '/match/14';
location.port = '';
location.protocol = 'https:';
location.reload = '';
location.replace = '';
location.search = '';
location.toString = '';
location.valueOf = '';
document = {
location: location
};
z = [
navigator['appCodeName'],
navigator['appName'],
navigator['appVersion'],
navigator['connection'],
navigator['cookieEnabled'],
navigator['doNotTrack'],
navigator['geolocation'],
navigator['hardwareConcurrency'],
navigator['language'],
navigator['languages'],
navigator['maxTouchPoints'],
navigator['mediaCapabilities'],
navigator['mediaSession'],
navigator['mimeTypes'],
navigator['onLine'],
navigator['permissions'],
navigator['platform'],
navigator['plugins'],
navigator['product'],
navigator['productSub'],
navigator['userActivation'],
navigator['userAgent'],
navigator['vendor'],
navigator['vendorSub'],
navigator['webkitPersistentStorage'],
navigator['webkitTemporaryStorage'],
screen['availHeight'],
screen['availLeft'],
screen['availTop'],
screen['availWidth'],
screen['colorDepth'],
screen['height'],
screen['orientation'],
screen['pixelDepth'],
screen['width'],
document['location']['ancestorOrigins'],
document['location']['assign'],
document['location']['hash'],
document['location']['host'],
document['location']['hostname'],
document['location']['href'],
document['location']['origin'],
document['location']['pathname'],
document['location']['port'],
document['location']['protocol'],
document['location']['reload'],
document['location']['replace'],
document['location']['search'],
document['location']['toString'],
document['location']['valueOf']
];
console.log(z);
b64_zw = btoa(z);
document['cookie'] = 'mz=' + b64_zw + ';path=/';
console.log(document['cookie']);

View File

@ -1,458 +1,3 @@
## hook cookie mz=
解题思路:
```javascript
// ==UserScript==
// @name hook cookie
// @namespace http://tampermonkey.net/
// @version 0.1
// @description pass
// @author ayf
// @run-at document-start
// @match *://*/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
Object.defineProperty(document, "cookie", {
set:function(val){
console.log('hook cookie')
if(val.indexOf("mz=") != -1){
debugger;
}
return val;
}
})
})();
```
cookie生成
```javascript
document['\x63\x6f' + '\x6f\x6b' + '\x69\x65'] = G['\x6e\x4d' + '\x48\x69' + '\x44'](G['\x4e\x75' + '\x6d\x4b' + '\x4a'] + b64_zw, G['\x5a\x44' + '\x4b\x62' + '\x76']);
```
还原后
```javascript
document['cookie'] = mz=' + b64_zw + ';path=/';
```
b64_zw生成
```javascript
b64_zw = G['\x63\x57' + '\x51\x54' + '\x54'](btoa, z)
```
还原后
```javascript
b64_zw = btoa(z)
```
b64_zw生成
```javascript
z = [navigator['\x61\x70' + '\x70\x43' + '\x6f\x64' + '\x65\x4e' + '\x61\x6d' + '\x65'], navigator['\x61\x70' + '\x70\x4e' + '\x61\x6d' + '\x65'], navigator['\x61\x70' + '\x70\x56' + '\x65\x72' + '\x73\x69' + '\x6f\x6e'], navigator['\x63\x6f' + '\x6e\x6e' + '\x65\x63' + '\x74\x69' + '\x6f\x6e'], navigator['\x63\x6f' + '\x6f\x6b' + '\x69\x65' + '\x45\x6e' + '\x61\x62' + '\x6c\x65' + '\x64'], navigator['\x64\x6f' + '\x4e\x6f' + '\x74\x54' + '\x72\x61' + '\x63\x6b'], navigator['\x67\x65' + '\x6f\x6c' + '\x6f\x63' + '\x61\x74' + '\x69\x6f' + '\x6e'], navigator['\x68\x61' + '\x72\x64' + '\x77\x61' + '\x72\x65' + '\x43\x6f' + '\x6e\x63' + '\x75\x72' + '\x72\x65' + '\x6e\x63' + '\x79'], navigator['\x6c\x61' + '\x6e\x67' + '\x75\x61' + '\x67\x65'], navigator['\x6c\x61' + '\x6e\x67' + '\x75\x61' + '\x67\x65' + '\x73'], navigator['\x6d\x61' + '\x78\x54' + '\x6f\x75' + '\x63\x68' + '\x50\x6f' + '\x69\x6e' + '\x74\x73'], navigator['\x6d\x65' + '\x64\x69' + '\x61\x43' + '\x61\x70' + '\x61\x62' + '\x69\x6c' + '\x69\x74' + '\x69\x65' + '\x73'], navigator['\x6d\x65' + '\x64\x69' + '\x61\x53' + '\x65\x73' + '\x73\x69' + '\x6f\x6e'], navigator['\x6d\x69' + '\x6d\x65' + '\x54\x79' + '\x70\x65' + '\x73'], navigator['\x6f\x6e' + '\x4c\x69' + '\x6e\x65'], navigator['\x70\x65' + '\x72\x6d' + '\x69\x73' + '\x73\x69' + '\x6f\x6e' + '\x73'], navigator['\x70\x6c' + '\x61\x74' + '\x66\x6f' + '\x72\x6d'], navigator['\x70\x6c' + '\x75\x67' + '\x69\x6e' + '\x73'], navigator['\x70\x72' + '\x6f\x64' + '\x75\x63' + '\x74'], navigator['\x70\x72' + '\x6f\x64' + '\x75\x63' + '\x74\x53' + '\x75\x62'], navigator['\x75\x73' + '\x65\x72' + '\x41\x63' + '\x74\x69' + '\x76\x61' + '\x74\x69' + '\x6f\x6e'], navigator['\x75\x73' + '\x65\x72' + '\x41\x67' + '\x65\x6e' + '\x74'], navigator['\x76\x65' + '\x6e\x64' + '\x6f\x72'], navigator['\x76\x65' + '\x6e\x64' + '\x6f\x72' + '\x53\x75' + '\x62'], navigator['\x77\x65' + '\x62\x6b' + '\x69\x74' + '\x50\x65' + '\x72\x73' + '\x69\x73' + '\x74\x65' + '\x6e\x74' + '\x53\x74' + '\x6f\x72' + '\x61\x67' + '\x65'], navigator['\x77\x65' + '\x62\x6b' + '\x69\x74' + '\x54\x65' + '\x6d\x70' + '\x6f\x72' + '\x61\x72' + '\x79\x53' + '\x74\x6f' + '\x72\x61' + '\x67\x65'], screen['\x61\x76' + '\x61\x69' + '\x6c\x48' + '\x65\x69' + '\x67\x68' + '\x74'], screen['\x61\x76' + '\x61\x69' + '\x6c\x4c' + '\x65\x66' + '\x74'], screen['\x61\x76' + '\x61\x69' + '\x6c\x54' + '\x6f\x70'], screen['\x61\x76' + '\x61\x69' + '\x6c\x57' + '\x69\x64' + '\x74\x68'], screen['\x63\x6f' + '\x6c\x6f' + '\x72\x44' + '\x65\x70' + '\x74\x68'], screen['\x68\x65' + '\x69\x67' + '\x68\x74'], screen['\x6f\x72' + '\x69\x65' + '\x6e\x74' + '\x61\x74' + '\x69\x6f' + '\x6e'], screen['\x70\x69' + '\x78\x65' + '\x6c\x44' + '\x65\x70' + '\x74\x68'], screen['\x77\x69' + '\x64\x74' + '\x68'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x61\x6e' + '\x63\x65' + '\x73\x74' + '\x6f\x72' + '\x4f\x72' + '\x69\x67' + '\x69\x6e' + '\x73'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x61\x73' + '\x73\x69' + '\x67\x6e'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x68\x61' + '\x73\x68'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x68\x6f' + '\x73\x74'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x68\x6f' + '\x73\x74' + '\x6e\x61' + '\x6d\x65'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x68\x72' + '\x65\x66'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x6f\x72' + '\x69\x67' + '\x69\x6e'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x70\x61' + '\x74\x68' + '\x6e\x61' + '\x6d\x65'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x70\x6f' + '\x72\x74'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x70\x72' + '\x6f\x74' + '\x6f\x63' + '\x6f\x6c'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x72\x65' + '\x6c\x6f' + '\x61\x64'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x72\x65' + '\x70\x6c' + '\x61\x63' + '\x65'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x73\x65' + '\x61\x72' + '\x63\x68'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x74\x6f' + '\x53\x74' + '\x72\x69' + '\x6e\x67'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x76\x61' + '\x6c\x75' + '\x65\x4f' + '\x66']],
```
还原后
```javascript
b64_zw = btoa(z)
```
z生成
```javascript
z = [navigator['\x61\x70' + '\x70\x43' + '\x6f\x64' + '\x65\x4e' + '\x61\x6d' + '\x65'], navigator['\x61\x70' + '\x70\x4e' + '\x61\x6d' + '\x65'], navigator['\x61\x70' + '\x70\x56' + '\x65\x72' + '\x73\x69' + '\x6f\x6e'], navigator['\x63\x6f' + '\x6e\x6e' + '\x65\x63' + '\x74\x69' + '\x6f\x6e'], navigator['\x63\x6f' + '\x6f\x6b' + '\x69\x65' + '\x45\x6e' + '\x61\x62' + '\x6c\x65' + '\x64'], navigator['\x64\x6f' + '\x4e\x6f' + '\x74\x54' + '\x72\x61' + '\x63\x6b'], navigator['\x67\x65' + '\x6f\x6c' + '\x6f\x63' + '\x61\x74' + '\x69\x6f' + '\x6e'], navigator['\x68\x61' + '\x72\x64' + '\x77\x61' + '\x72\x65' + '\x43\x6f' + '\x6e\x63' + '\x75\x72' + '\x72\x65' + '\x6e\x63' + '\x79'], navigator['\x6c\x61' + '\x6e\x67' + '\x75\x61' + '\x67\x65'], navigator['\x6c\x61' + '\x6e\x67' + '\x75\x61' + '\x67\x65' + '\x73'], navigator['\x6d\x61' + '\x78\x54' + '\x6f\x75' + '\x63\x68' + '\x50\x6f' + '\x69\x6e' + '\x74\x73'], navigator['\x6d\x65' + '\x64\x69' + '\x61\x43' + '\x61\x70' + '\x61\x62' + '\x69\x6c' + '\x69\x74' + '\x69\x65' + '\x73'], navigator['\x6d\x65' + '\x64\x69' + '\x61\x53' + '\x65\x73' + '\x73\x69' + '\x6f\x6e'], navigator['\x6d\x69' + '\x6d\x65' + '\x54\x79' + '\x70\x65' + '\x73'], navigator['\x6f\x6e' + '\x4c\x69' + '\x6e\x65'], navigator['\x70\x65' + '\x72\x6d' + '\x69\x73' + '\x73\x69' + '\x6f\x6e' + '\x73'], navigator['\x70\x6c' + '\x61\x74' + '\x66\x6f' + '\x72\x6d'], navigator['\x70\x6c' + '\x75\x67' + '\x69\x6e' + '\x73'], navigator['\x70\x72' + '\x6f\x64' + '\x75\x63' + '\x74'], navigator['\x70\x72' + '\x6f\x64' + '\x75\x63' + '\x74\x53' + '\x75\x62'], navigator['\x75\x73' + '\x65\x72' + '\x41\x63' + '\x74\x69' + '\x76\x61' + '\x74\x69' + '\x6f\x6e'], navigator['\x75\x73' + '\x65\x72' + '\x41\x67' + '\x65\x6e' + '\x74'], navigator['\x76\x65' + '\x6e\x64' + '\x6f\x72'], navigator['\x76\x65' + '\x6e\x64' + '\x6f\x72' + '\x53\x75' + '\x62'], navigator['\x77\x65' + '\x62\x6b' + '\x69\x74' + '\x50\x65' + '\x72\x73' + '\x69\x73' + '\x74\x65' + '\x6e\x74' + '\x53\x74' + '\x6f\x72' + '\x61\x67' + '\x65'], navigator['\x77\x65' + '\x62\x6b' + '\x69\x74' + '\x54\x65' + '\x6d\x70' + '\x6f\x72' + '\x61\x72' + '\x79\x53' + '\x74\x6f' + '\x72\x61' + '\x67\x65'], screen['\x61\x76' + '\x61\x69' + '\x6c\x48' + '\x65\x69' + '\x67\x68' + '\x74'], screen['\x61\x76' + '\x61\x69' + '\x6c\x4c' + '\x65\x66' + '\x74'], screen['\x61\x76' + '\x61\x69' + '\x6c\x54' + '\x6f\x70'], screen['\x61\x76' + '\x61\x69' + '\x6c\x57' + '\x69\x64' + '\x74\x68'], screen['\x63\x6f' + '\x6c\x6f' + '\x72\x44' + '\x65\x70' + '\x74\x68'], screen['\x68\x65' + '\x69\x67' + '\x68\x74'], screen['\x6f\x72' + '\x69\x65' + '\x6e\x74' + '\x61\x74' + '\x69\x6f' + '\x6e'], screen['\x70\x69' + '\x78\x65' + '\x6c\x44' + '\x65\x70' + '\x74\x68'], screen['\x77\x69' + '\x64\x74' + '\x68'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x61\x6e' + '\x63\x65' + '\x73\x74' + '\x6f\x72' + '\x4f\x72' + '\x69\x67' + '\x69\x6e' + '\x73'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x61\x73' + '\x73\x69' + '\x67\x6e'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x68\x61' + '\x73\x68'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x68\x6f' + '\x73\x74'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x68\x6f' + '\x73\x74' + '\x6e\x61' + '\x6d\x65'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x68\x72' + '\x65\x66'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x6f\x72' + '\x69\x67' + '\x69\x6e'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x70\x61' + '\x74\x68' + '\x6e\x61' + '\x6d\x65'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x70\x6f' + '\x72\x74'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x70\x72' + '\x6f\x74' + '\x6f\x63' + '\x6f\x6c'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x72\x65' + '\x6c\x6f' + '\x61\x64'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x72\x65' + '\x70\x6c' + '\x61\x63' + '\x65'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x73\x65' + '\x61\x72' + '\x63\x68'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x74\x6f' + '\x53\x74' + '\x72\x69' + '\x6e\x67'], document['\x6c\x6f' + '\x63\x61' + '\x74\x69' + '\x6f\x6e']['\x76\x61' + '\x6c\x75' + '\x65\x4f' + '\x66']]
```
还原后
```javascript
z = [
navigator['appCodeName'],
navigator['appName'],
navigator['appVersion'],
navigator['connection'],
navigator['cookieEnabled'],
navigator['doNotTrack'],
navigator['geolocation'],
navigator['hardwareConcurrency'],
navigator['language'],
navigator['languages'],
navigator['maxTouchPoints'],
navigator['mediaCapabilities'],
navigator['mediaSession'],
navigator['mimeTypes'],
navigator['onLine'],
navigator['permissions'],
navigator['platform'],
navigator['plugins'],
navigator['product'],
navigator['productSub'],
navigator['userActivation'],
navigator['userAgent'],
navigator['vendor'],
navigator['vendorSub'],
navigator['webkitPersistentStorage'],
navigator['webkitTemporaryStorage'],
screen['availHeight'],
screen['availLeft'],
screen['availTop'],
screen['availWidth'],
screen['colorDepth'],
screen['height'],
screen['orientation'],
screen['pixelDepth'],
screen['width'],
document['location']['ancestorOrigins'],
document['location']['assign'],
document['location']['hash'],
document['location']['host'],
document['location']['hostname'],
document['location']['href'],
document['location']['origin'],
document['location']['pathname'],
document['location']['port'],
document['location']['protocol'],
document['location']['reload'],
document['location']['replace'],
document['location']['search'],
document['location']['toString'],
document['location']['valueOf']
]
```
## 删除检测代码
格式化检测1
```javascript
var _0x5b597e = function() {
var _0x1ca6f6 = new RegExp("\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}");
return _0x1ca6f6.test(_0x338243.removeCookie.toString());
};
```
还原后
```javascript
var _0x5b597e = function() {
var _0x1ca6f6 = new RegExp("");
return _0x1ca6f6.test(_0x338243.removeCookie.toString());
};
```
格式化检测2
```javascript
this.YPtKGA = "\\w+ *\\(\\) *{\\w+ *";
this.FFSDOr = "['|\"].+['|\"];? *}";
```
还原后
```javascript
this.YPtKGA = "";
this.FFSDOr = "";
```
## hook cookie m=
```javascript
// ==UserScript==
// @name hook cookie
// @namespace http://tampermonkey.net/
// @version 0.1
// @description pass
// @author ayf
// @run-at document-start
// @match *://*/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
Object.defineProperty(document, "cookie", {
set:function(val){
console.log('hook cookie')
if(val.indexOf("m=") != -1){
debugger;
}
return val;
}
})
})();
```
加密点
![debugger](./img/1.png)
cookie生成
```javascript
document.cookie = G.fixAu(G.OoepU(G.OoepU(G.MQOJb(G.JEyfp(G.JEyfp(G.LnlnO("m=", G.tlpBr(m5, G.CdSNM(gee, aa, bb, c, d, e, b64_zw))), "|"), b), "|") + a, "|"), window.n), G.ZDKbv)
```
还原后
```javascript
document.cookie = "m=" + m5(gee(aa, bb, c, d, e, b64_zw)) + "|" + b + "|" + a +"|" + window.n + ';path=/';
```
m5生成
![debugger](./img/2.png)
gee生成
![debugger](./img/3.png)
node环境运行
报错
```javascript
ReferenceError: navigator is not defined
```
补环境
```javascript
navigator = {};
navigator.appCodeName = 'Mozilla';
navigator.cookieEnabled = true;
```
报错
```javascript
ReferenceError: CanvasCaptureMediaStreamTrack is not defined
```
CanvasCaptureMediaStreamTrack检测
```javascript
try {
bp = eval("CanvasCaptureMediaStreamTrack");
var cb = cP << 24 | cP << 16 | cP << 8 | cP;
var cu = [];
} catch (cm) {
console.log(cm);
console.log(cm);
console.log(cm);
var cb = 0;
var cu = [];
}
```
删除无效部分
```javascript
var cb = cP << 24 | cP << 16 | cP << 8 | cP;
var cu = [];
```
aa 生成
```javascript
a = Date.parse(new Date) * 8;
p = G.cWQTT(E, G.tlpBr(parseInt, G.BtdNq(a, 8)));
aa = m5(p);
```
还原后
```javascript
a = Date.parse(new Date) * 8;
p = E(parseInt(a / 8));
aa = m5(p);
```
E 生成
```javascript
function E(K) {
var Y = {};
Y.omDMx = G.vplbC;
Y.CuLuB = function(h, b) {
return G.TcSyJ(h, b)
}
;
Y.OPnPG = function(h, b) {
return G.bOtEk(h, b)
}
;
Y.PtKem = function(h, b) {
return G.vwmjl(h, b)
}
;
Y.eZkFz = function(h, b) {
return G.vwmjl(h, b)
}
;
Y.kXFxj = function(h, b) {
return h + b
}
;
Y.AKZTZ = function(h, b) {
return h + b
}
;
Y.JYVAM = function(h, b) {
return G.ykolN(h, b)
}
;
Y.gJsFT = function(h, b) {
return G.Wmydc(h, b)
}
;
Y.xiQWv = function(h, b) {
return h + b
}
;
Y.pSnMY = function(h, b) {
return G.xkAVN(h, b)
}
;
Y.SgOqf = function(h, b) {
return G.UnFsY(h, b)
}
;
Y.wxVwq = "jsencrypt";
var x = Y;
function d(h, b) {
var F = x.omDMx.split("|");
var H = 0;
while (!![]) {
switch (F[H++]) {
case "0":
var D = b;
continue;
case "1":
var u = new I;
continue;
case "2":
var Q = u.encode(h, D);
continue;
case "3":
if (x.CuLuB(m5[x.OPnPG(x.PtKem(x.eZkFz("to", "St"), "ri"), "ng")]()[x.kXFxj(x.AKZTZ("inde", "xO"), "f")]("\n"), -(x.JYVAM(1507, x.gJsFT(-311, -11)) + -4927)))
while (!![]) {
console.log(x.xiQWv(x.pSnMY(x.pSnMY(x.pSnMY("\u751F\u800C", "\u4E3A\u866B"), "\uFF0C\u6211"), "\u5F88\u62B1"), "\u6B49"))
}
continue;
case "4":
return Q;
case "5":
var I = x.SgOqf(_n, x.wxVwq);
continue;
}
break
}
}
return result = G.UMXqo(d, K, K),
result
}
```
还原后
```javascript
function E(K) {
var Y = {};
Y.omDMx = '0|5|1|2|3|4';
Y.CuLuB = function(h, b) {
return h != b
}
;
Y.OPnPG = function(h, b) {
return h + b
}
;
Y.PtKem = function(h, b) {
return h + b
}
;
Y.eZkFz = function(h, b) {
return h + b
}
;
Y.kXFxj = function(h, b) {
return h + b
}
;
Y.AKZTZ = function(h, b) {
return h + b
}
;
Y.JYVAM = function(h, b) {
return h + b
}
;
Y.gJsFT = function(h, b) {
return h * b
}
;
Y.xiQWv = function(h, b) {
return h + b
}
;
Y.pSnMY = function(h, b) {
return h + b
}
;
Y.SgOqf = function(h, b) {
return h(b)
}
;
Y.wxVwq = "jsencrypt";
var x = Y;
function d(h, b) {
var F = x.omDMx.split("|");
var H = 0;
while (!![]) {
switch (F[H++]) {
case "0":
var D = b;
continue;
case "1":
var u = new I;
continue;
case "2":
var Q = u.encode(h, D);
continue;
case "3":
if (x.CuLuB(m5[x.OPnPG(x.PtKem(x.eZkFz("to", "St"), "ri"), "ng")]()[x.kXFxj(x.AKZTZ("inde", "xO"), "f")]("\n"), -(x.JYVAM(1507, x.gJsFT(-311, -11)) + -4927)))
while (!![]) {
console.log(x.xiQWv(x.pSnMY(x.pSnMY(x.pSnMY("\u751F\u800C", "\u4E3A\u866B"), "\uFF0C\u6211"), "\u5F88\u62B1"), "\u6B49"))
}
continue;
case "4":
return Q;
case "5":
var I = x.SgOqf(_n, x.wxVwq);
continue;
}
break
}
}
return result = d(K, K), result
}
```
无线循环
```javascript
if (x.CuLuB(m5[x.OPnPG(x.PtKem(x.eZkFz("to", "St"), "ri"), "ng")]()[x.kXFxj(x.AKZTZ("inde", "xO"), "f")]("\n"), -(x.JYVAM(1507, x.gJsFT(-311, -11)) + -4927)))
while (!![]) {
console.log(x.xiQWv(x.pSnMY(x.pSnMY(x.pSnMY("\u751F\u800C", "\u4E3A\u866B"), "\uFF0C\u6211"), "\u5F88\u62B1"), "\u6B49"))
}
continue;
```
还原后,这是一段代码格式化检测
```javascript
if (m5['toString']()['indexOf']("\n") != -1)
while (!![]) {
console.log('生而为虫,我很抱歉')
}
```
运行代码:
```javascript
第一次
PXQfGBR5AwChSToMrtGAo7giJNcQoAaZIgaD46Bg9zAEHVGhgRkQDsLhISr%2FCA4AkwDn6goCbSChAt8IJDwgIOGgCBgf0aPHpTI0X8GhJMkiJggSIu2SIBoxQoOIEDAwvsKhrOIAFI3ToIhkIC7KUaJuIAoAp%2BADoYEYHhtCIUI%3D
第二次
P2vLEh4YwiMI3hA%2Bx9CBrC0QGALhgkodCBZXMqMLBQoQhdKigH8wCqvzoqDEGiC%2BASIGDQoasDGABzcwNKGggmn%2BEDIMsiNC8hICOXKiphsqDPgjIuH%2FKDrVAqFv%2BAgAoCKg778gIuryAaLoMjZqoyDmngAqXdMAZNM6FHQigG8%3D
```
重新加载
```javascript
第一次
PXQfGBR5AwChSToMrtGAo7giJNcQoAaZIgaD46Bg9zAEHVGhgRkQDsLhISr%2FCA4AkwDn6goCbSChAt8IJDwgIOGgCBgf0aPHpTI0X8GhJMkiJggSIu2SIBoxQoOIEDAwvsKhrOIAFI3ToIhkIC7KUaJuIAoAp%2BADoYEYHhtCIUI%3D
第二次
P2vLEh4YwiMI3hA%2Bx9CBrC0QGALhgkodCBZXMqMLBQoQhdKigH8wCqvzoqDEGiC%2BASIGDQoasDGABzcwNKGggmn%2BEDIMsiNC8hICOXKiphsqDPgjIuH%2FKDrVAqFv%2BAgAoCKg778gIuryAaLoMjZqoyDmngAqXdMAZNM6FHQigG8%3D
```
node检测代码
```javascript
eval("delete document");
eval("delete window");
eval("window = {}");
```
https://blog.csdn.net/u010226586/article/details/135469894

View File

@ -0,0 +1,104 @@
const fs = require('fs');
const {parse} = require("@babel/parser");
const traverse = require("@babel/traverse").default;
const generator = require("@babel/generator").default;
const t = require("@babel/types");
function get_sojson_enc(ast) {
var first_idx = 0;
for (var i = 0; i < ast.program.body.length; i++) {
if (ast.program.body[i].type != 'EmptyStatement') {
first_idx = i;
break
}
}
var decrypt_code = ast.program.body.slice(first_idx, first_idx + 3);
var rest_code = ast.program.body.slice(first_idx + 3);
ast.program.body = decrypt_code;
var {code} = generator(ast, {
compact: true
});
global_code = code;
decryptStr = decrypt_code[2].declarations[0].id.name;
ast.program.body = rest_code;
return ast
}
function calcBinary(path) {
var tps = ['StringLiteral', 'BooleanLiteral', 'NumericLiteral'];
var nod = path.node;
function judge(e) {
return (tps.indexOf(e.type) != -1) || (e.type == 'UnaryExpression' && tps.indexOf(e.argument.type) != -1)
}
function make_rep(e) {
if (typeof e == 'number') {
return t.NumericLiteral(e)
}
if (typeof e == 'string') {
return t.StringLiteral(e)
}
if (typeof e == 'boolean') {
return t.BooleanLiteral(e)
}
throw Error('unknown type' + typeof e)
}
if (judge(nod.left) && judge(nod.right)) {
path.replaceWith(make_rep(eval(path + '')))
}
}
function pas_sojson_enc(ast) {
eval(global_code);
traverse(ast, {
CallExpression: funToStr,
StringLiteral: delExtra,
NumericLiteral: delExtra,
});
return ast;
function funToStr(path) {
var node = path.node;
if (!t.isIdentifier(node.callee, {name: decryptStr}))
return;
let value = eval(path.toString());
// console.log("还原前:" + path.toString(), "还原后:" + value);
path.replaceWith(t.valueToNode(value));
}
function delExtra(path) {
delete path.node.extra;
}
}
function muti_process_sojsondefusion(jscode, config) {
var ast = parse(jscode);
config = config || {};
if (ast.program.body.length == 1) {
ast.program.body = ast.program.body[0].expression.callee.body.bodygenerator
}
// ob 解混淆处理部分
ast = get_sojson_enc(ast);
ast = pas_sojson_enc(ast);
traverse(ast, {BinaryExpression: {exit: calcBinary}});
var {code} = generator(ast, {jsescOption: {minimal: true,}});
return code;
}
// let encode_file = "./m.js";
// let js_code = fs.readFileSync(encode_file, {encoding: "utf-8"});
// console.log(muti_process_sojsondefusion(js_code));
function v14_v142(js_code) {
return muti_process_sojsondefusion(js_code)
}
module.exports =
{
v14_v142
};

View File

@ -0,0 +1,11 @@
// 'TW96aWxsYSxOZXRzY2FwZSw1LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEyMC4wLj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2JqZWN0IFVzZXJBY3RpdmF0aW9uXSxNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvMTIwLjAuMC4wIFNhZmFyaS81MzcuMzYsR29vZ2xlIEluYy4sLFtvYmplY3QgRGVwcmVjYXRlZFN0b3JhZ2VRdW90YV0sW29iamVjdCBEZXByZWNhdGVkU3RvcmFnZVF1b3RhXSw4MjQsMCwwLDE1MzYsMjQsODY0LFtvYmplY3QgU2NyZWVuT3JpZW50YXRpb25dLDI0LDE1MzYsW29iamVjdCBET01TdHJpbmdMaXN0XSxmdW5jdGlvbiBhc3NpZ24oKSB7IFtuYXRpdmUgY29kZV0gfSwsbWF0Y2gueXVhbnJlbnh1ZS5jbixtYXRjaC55dWFucmVueHVlLmNuLGh0dHBzOi8vbWF0Y2gueXVhbnJlbnh1ZS5jbi9tYXRjaC8xNCxodHRwczovL21hdGNoLnl1YW5yZW54dWUuY24sL21hdGNoLzE0LCxodHRwczosZnVuY3Rpb24gcmVsb2FkKCkgeyBbbmF0aXZlIGNvZGVdIH0sZnVuY3Rpb24gcmVwbGFjZSgpIHsgW25hdGl2ZSBjb2RlXSB9LCxmdW5jdGlvbiB0b1N0cmluZygpIHsgW25hdGl2ZSBjb2RlXSB9LGZ1bmN0aW9uIHZhbHVlT2YoKSB7IFtuYXRpdmUgY29kZV0gfQ==;
// var z = [navigator.appCodeName, navigator.appName, navigator.appVersion, navigator.connection, navigator.cookieEnabled, navigator.doNotTrack, navigator.geolocation, navigator.hardwareConcurrency, navigator.language, navigator.languages, navigator.maxTouchPoints, navigator.mediaCapabilities, navigator.mediaSession, navigator.mimeTypes, navigator.onLine, navigator.permissions, navigator.platform, navigator.plugins, navigator.product, navigator.productSub, navigator.userActivation, navigator.userAgent, navigator.vendor, navigator.vendorSub, navigator.webkitPersistentStorage, navigator.webkitTemporaryStorage, screen.availHeight, screen.availLeft, screen.availTop, screen.availWidth, screen.colorDepth, screen.height, screen.orientation, screen.pixelDepth, screen.width, document.location.ancestorOrigins, document.location.assign, document.location.hash, document.location.host, document.location.hostname, document.location.href, document.location.origin, document.location.pathname, document.location.port, document.location.protocol, document.location.reload, document.location.replace, document.location.search, document.location.toString, document.location.valueOf];
var z = 'Mozilla,Netscape,5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36,[object NetworkInformation],true,,[object Geolocation],8,zh-CN,zh-CN,zh,en,0,[object MediaCapabilities],[object MediaSession],[object MimeTypeArray],true,[object Permissions],Win32,[object PluginArray],Gecko,20030107,[object UserActivation],Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36,Google Inc.,,[object DeprecatedStorageQuota],[object DeprecatedStorageQuota],824,0,0,1536,24,864,[object ScreenOrientation],24,1536,[object DOMStringList],function assign() { [native code] },,match.yuanrenxue.cn,match.yuanrenxue.cn,https://match.yuanrenxue.cn/match/14,https://match.yuanrenxue.cn,/match/14,,https:,function reload() { [native code] },function replace() { [native code] },,function toString() { [native code] },function valueOf() { [native code] }';
let buffer = Buffer.from(z);
console.log(buffer.toString('base64'));

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,569 @@
var m5 = function (R) {
var L = {};
L.aKzhL = function (S, P) {
return S + P
}
;
L.IboVR = function (S, P) {
return S & P
}
;
L.DNzZE = function (S, P) {
return S | P
}
;
L.QpEsx = function (S, P) {
return S << P
}
;
L.imxsL = function (S, P) {
return S + P
}
;
L.Ggivm = function (S, P) {
return S >> P
}
;
L.SmVHF = function (S, P) {
return S >>> P
}
;
L.fsjKS = function (S, P) {
return S - P
}
;
L.fSLcK = function (S, P, F) {
return S(P, F)
}
;
L.ARPpy = function (S, P, F) {
return S(P, F)
}
;
L.qhaRQ = function (S, P, F) {
return S(P, F)
}
;
L.fEqaE = function (S, P, F, W, O, j, V) {
return S(P, F, W, O, j, V)
}
;
L.Wbguo = function (S, P) {
return S & P
}
;
L.KWoEV = function (S, P) {
return S < P
}
;
L.ILoTh = function (S, P, F, W, O, j, V) {
return S(P, F, W, O, j, V)
}
;
L.okRQG = function (S, P, F, W, O, j, V) {
return S(P, F, W, O, j, V)
}
;
L.vwndq = function (S, P) {
return S ^ P
}
;
L.jtXbK = function (S, P) {
return S(P)
}
;
L.kZnvI = function (S, P) {
return S << P
}
;
L.DWwsg = function (S, P) {
return S % P
}
;
L.sBynh = function (S, P) {
return S + P
}
;
L.SxLNa = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.PwePj = function (S, P) {
return S + P
}
;
L.OAixR = function (S, P) {
return S + P
}
;
L.Xvpqy = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.GtxWX = function (S, P) {
return S + P
}
;
L.iMaYS = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.sPatp = function (S, P) {
return S + P
}
;
L.vkggx = function (S, P) {
return S + P
}
;
L.FGwhe = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.YNkLX = function (S, P) {
return S + P
}
;
L.uYDPG = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.KGCMU = function (S, P) {
return S + P
}
;
L.BCuvW = function (S, P) {
return S + P
}
;
L.HwFsj = function (S, P) {
return S + P
}
;
L.oZhVH = function (S, P) {
return S + P
}
;
L.iZEHn = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.Xiuyt = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.oSXjh = function (S, P) {
return S + P
}
;
L.fNvsk = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.iLNfA = function (S, P) {
return S + P
}
;
L.GPLUG = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.YShxM = function (S, P) {
return S + P
}
;
L.afszS = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.Xntjx = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.fOGYL = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.qfZPk = function (S, P) {
return S + P
}
;
L.fJPTo = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.wejOe = function (S, P) {
return S + P
}
;
L.RwQYv = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.qiHtl = function (S, P) {
return S + P
}
;
L.JfQQO = function (S, P) {
return S + P
}
;
L.KUnHd = function (S, P) {
return S + P
}
;
L.QxbEn = function (S, P) {
return S + P
}
;
L.bnNtt = function (S, P) {
return S + P
}
;
L.knYWR = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.MkmCs = function (S, P) {
return S + P
}
;
L.vSaba = function (S, P) {
return S + P
}
;
L.aompu = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.AwbhI = function (S, P) {
return S + P
}
;
L.aDEqK = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.YakKN = function (S, P) {
return S + P
}
;
L.IFWwn = function (S, P) {
return S + P
}
;
L.BlUnC = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.LBuSd = function (S, P) {
return S + P
}
;
L.MqSBM = function (S, P) {
return S + P
}
;
L.URIyI = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.qwrmT = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.NQmXy = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.JreHY = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.FVOTc = function (S, P, F, W, O, j, V, z) {
return S(P, F, W, O, j, V, z)
}
;
L.Njfcs = function (S, P, F) {
return S(P, F)
}
;
L.yIgzA = function (S, P) {
return S < P
}
;
L.xvljL = function (S, P) {
return S % P
}
;
L.IjPNE = function (S, P) {
return S < P
}
;
L.bumLS = function (S, P) {
return S >> P
}
;
L.NffyU = function (S, P) {
return S / P
}
;
L.rTQsZ = function (S, P) {
return S * P
}
;
L.xXCLw = function (S, P) {
return S * P
}
;
L.uvqZR = "0123456789abcdef";
L.QFqjy = function (S, P) {
return S & P
}
;
L.OCmsj = function (S, P) {
return S(P)
}
;
L.ovpLb = function (S, P) {
return S(P)
}
;
L.nibIE = function (S, P) {
return S(P)
}
;
L.Ieqac = function (S, P, F) {
return S(P, F)
}
;
L.TMhmA = function (S, P, F) {
return S(P, F)
}
;
L.YzZil = function (S, P) {
return S(P)
}
;
L.CBicJ = function (S, P) {
return S(P)
}
;
L.UVLga = function (S, P) {
return S(P)
}
;
var G = L;
function C(S, P) {
var F = G.aKzhL(G.IboVR(65535, S), G.IboVR(65535, P));
return G.DNzZE(G.QpEsx(G.aKzhL(G.imxsL(G.Ggivm(S, 16), G.Ggivm(P, 16)), G.Ggivm(F, 16)), 16), G.IboVR(65535, F))
}
function Y(S, P) {
return G.QpEsx(S, P) | G.SmVHF(S, G.fsjKS(32, P))
}
function A(S, P, F, W, O, j) {
return G.fSLcK(C, Y(C(G.ARPpy(C, P, S), G.qhaRQ(C, W, j)), O), F)
}
function h(S, P, F, W, O, j, V) {
return G.fEqaE(A, G.IboVR(P, F) | ~P & W, S, P, O, j, V)
}
function x(S, P, F, W, O, j, V) {
return G.fEqaE(A, G.Wbguo(P, W) | F & ~W, S, P, O, j, V)
}
function H(S, P) {
let F = [99, 111, 110, 115, 111, 108, 101];
let W = "";
for (let O = 0; G.KWoEV(O, F.length); O++) {
W += String.fromCharCode(F[O])
}
return W
}
function Z(S, P, F, W, O, j, V) {
return G.ILoTh(A, P ^ F ^ W, S, P, O, j, V)
}
function X(S, P, F, W, O, j, V) {
return G.okRQG(A, G.vwndq(F, G.DNzZE(P, ~W)), S, P, O, j, V)
}
function y(S, P) {
if (P)
return G.jtXbK(X, S);
return G.jtXbK(H, S)
}
function e(S, P) {
S[G.Ggivm(P, 5)] |= G.kZnvI(128, G.DWwsg(P, 32));
S[G.imxsL(14, G.kZnvI(G.SmVHF(P + 64, 9), 4))] = P;
var F;
var W;
var O;
var j;
var V;
var z = 1732584193;
var k = -271733879;
var E = -1732584194;
var T0 = 271733878;
for (F = 0; G.KWoEV(F, S.length); F += 16) {
W = z;
O = k;
j = E;
V = T0;
z = h(z, k, E, T0, S[F], 7, -680876936);
T0 = h(T0, z, k, E, S[G.sBynh(F, 1)], 12, -389564585);
E = G.SxLNa(h, E, T0, z, k, S[G.sBynh(F, 2)], 17, 606105819);
k = h(k, E, T0, z, S[G.PwePj(F, 3)], 22, -1044525330);
z = G.SxLNa(h, z, k, E, T0, S[F + 4], 7, -176418897);
T0 = G.SxLNa(h, T0, z, k, E, S[G.OAixR(F, 5)], 12, 1200080426);
E = G.SxLNa(h, E, T0, z, k, S[F + 6], 17, -1473231341);
k = G.SxLNa(h, k, E, T0, z, S[G.OAixR(F, 7)], 22, -45705983);
z = G.Xvpqy(h, z, k, E, T0, S[G.GtxWX(F, 8)], 7, 1770035416);
T0 = G.iMaYS(h, T0, z, k, E, S[G.sPatp(F, 9)], 12, -1958414417);
E = h(E, T0, z, k, S[G.vkggx(F, 10)], 17, -42063);
k = G.FGwhe(h, k, E, T0, z, S[G.YNkLX(F, 11)], 22, -1990404162);
z = G.uYDPG(h, z, k, E, T0, S[G.YNkLX(F, 12)], 7, 1804603682);
T0 = G.uYDPG(h, T0, z, k, E, S[G.KGCMU(F, 13)], 12, -40341101);
E = G.uYDPG(h, E, T0, z, k, S[G.BCuvW(F, 14)], 17, -1502882290);
k = G.uYDPG(h, k, E, T0, z, S[G.HwFsj(F, 15)], 22, 1236535329);
z = G.uYDPG(x, z, k, E, T0, S[G.oZhVH(F, 1)], 5, -165796510);
T0 = G.iZEHn(x, T0, z, k, E, S[G.oZhVH(F, 6)], 9, -1069501632);
E = x(E, T0, z, k, S[G.oZhVH(F, 11)], 14, 643717713);
k = G.Xiuyt(x, k, E, T0, z, S[F], 20, -373897302);
z = G.Xiuyt(x, z, k, E, T0, S[G.oSXjh(F, 5)], 5, -701558691);
T0 = G.Xiuyt(x, T0, z, k, E, S[F + 10], 9, 38016083);
E = G.fNvsk(x, E, T0, z, k, S[G.iLNfA(F, 15)], 14, -660478335);
k = x(k, E, T0, z, S[G.iLNfA(F, 4)], 20, -405537848);
z = G.GPLUG(x, z, k, E, T0, S[G.YShxM(F, 9)], 5, 568446438);
T0 = x(T0, z, k, E, S[G.YShxM(F, 14)], 9, -1019803690);
E = G.afszS(x, E, T0, z, k, S[F + 3], 14, -187363961);
k = x(k, E, T0, z, S[G.YShxM(F, 8)], 20, 1163531501);
z = G.Xntjx(x, z, k, E, T0, S[G.YShxM(F, 13)], 5, -1444681467);
T0 = G.Xntjx(x, T0, z, k, E, S[G.YShxM(F, 2)], 9, -51403784);
E = G.Xntjx(x, E, T0, z, k, S[F + 7], 14, 1735328473);
k = G.fOGYL(x, k, E, T0, z, S[G.YShxM(F, 12)], 20, -1926607734);
z = G.fOGYL(Z, z, k, E, T0, S[F + 5], 4, -378558);
T0 = G.fOGYL(Z, T0, z, k, E, S[G.YShxM(F, 8)], 11, -2022574463);
E = Z(E, T0, z, k, S[G.qfZPk(F, 11)], 16, 1839030562);
k = G.fJPTo(Z, k, E, T0, z, S[G.wejOe(F, 14)], 23, -35309556);
z = G.fJPTo(Z, z, k, E, T0, S[G.wejOe(F, 1)], 4, -1530992060);
T0 = G.RwQYv(Z, T0, z, k, E, S[G.qiHtl(F, 4)], 11, 1272893353);
E = Z(E, T0, z, k, S[G.qiHtl(F, 7)], 16, -155497632);
k = Z(k, E, T0, z, S[G.JfQQO(F, 10)], 23, -1094730640);
z = G.RwQYv(Z, z, k, E, T0, S[G.KUnHd(F, 13)], 4, 681279174);
T0 = Z(T0, z, k, E, S[F], 11, -358537222);
E = Z(E, T0, z, k, S[F + 3], 16, -722521979);
k = G.RwQYv(Z, k, E, T0, z, S[G.QxbEn(F, 6)], 23, 76029189);
z = Z(z, k, E, T0, S[G.bnNtt(F, 9)], 4, -640364487);
T0 = G.knYWR(Z, T0, z, k, E, S[F + 12], 11, -421815835);
E = G.knYWR(Z, E, T0, z, k, S[G.bnNtt(F, 15)], 16, 530742520);
k = Z(k, E, T0, z, S[G.MkmCs(F, 2)], 23, -995338651);
z = G.knYWR(X, z, k, E, T0, S[F], 6, -198630844);
T0 = G.knYWR(X, T0, z, k, E, S[F + 7], 10, 1126891415);
E = G.knYWR(X, E, T0, z, k, S[G.vSaba(F, 14)], 15, -1416354905);
k = G.knYWR(X, k, E, T0, z, S[F + 5], 21, -57434055);
z = G.aompu(X, z, k, E, T0, S[G.AwbhI(F, 12)], 6, 1700485571);
T0 = G.aDEqK(X, T0, z, k, E, S[G.YakKN(F, 3)], 10, -1894986606);
E = X(E, T0, z, k, S[G.IFWwn(F, 10)], 15, -1051523);
k = G.BlUnC(X, k, E, T0, z, S[G.LBuSd(F, 1)], 21, -2054922799);
z = G.BlUnC(X, z, k, E, T0, S[G.MqSBM(F, 8)], 6, 1873313359);
T0 = G.URIyI(X, T0, z, k, E, S[G.MqSBM(F, 15)], 10, -30611744);
E = G.URIyI(X, E, T0, z, k, S[F + 6], 15, -1560198380);
k = G.qwrmT(X, k, E, T0, z, S[G.MqSBM(F, 13)], 21, 1309151649);
z = G.NQmXy(X, z, k, E, T0, S[G.MqSBM(F, 4)], 6, -145523070);
T0 = G.JreHY(X, T0, z, k, E, S[F + 11], 10, -1120210379);
E = G.FVOTc(X, E, T0, z, k, S[F + 2], 15, 718787259);
k = G.FVOTc(X, k, E, T0, z, S[G.MqSBM(F, 9)], 21, -343485441);
z = G.qhaRQ(C, z, W);
k = G.qhaRQ(C, k, O);
E = G.Njfcs(C, E, j);
T0 = G.Njfcs(C, T0, V)
}
return [z, k, E, T0]
}
function D(S) {
var P;
var F = "";
var W = 32 * S.length;
for (P = 0; G.yIgzA(P, W); P += 8)
F += String.fromCharCode(G.Wbguo(G.SmVHF(S[G.Ggivm(P, 5)], G.xvljL(P, 32)), 255));
return F
}
function J(S) {
var P = "1|0|4|3|2".split("|");
var F = 0;
while (!![]) {
switch (P[F++]) {
case "0":
for (O[G.Ggivm(S.length, 2) - 1] = void 0,
W = 0; G.IjPNE(W, O.length); W += 1)
O[W] = 0;
continue;
case "1":
var W;
var O = [];
continue;
case "2":
return O;
case "3":
for (W = 0; W < j; W += 8)
O[G.bumLS(W, 5)] |= (255 & S.charCodeAt(G.NffyU(W, 8))) << G.xvljL(W, 32);
continue;
case "4":
var j = G.rTQsZ(8, S.length);
continue;
}
break
}
}
function U(S) {
return D(e(G.jtXbK(J, S), G.xXCLw(8, S.length)))
}
function M(S) {
var P;
var F;
var W = G.uvqZR;
var O = "";
for (F = 0; G.IjPNE(F, S.length); F += 1) {
P = S.charCodeAt(F);
O += G.MqSBM(W.charAt(G.SmVHF(P, 4) & 15), W.charAt(G.QFqjy(15, P)))
}
return O
}
function K(S) {
return G.OCmsj(unescape, G.ovpLb(encodeURIComponent, S))
}
function B(S) {
return U(G.nibIE(K, S))
}
function I(S) {
return G.nibIE(M, G.nibIE(B, S))
}
function Q(S, P, F) {
return P ? F ? G.Ieqac(H, P, S) : G.TMhmA(y, P, S) : F ? G.YzZil(B, S) : G.CBicJ(I, S)
}
return token = G.UVLga(Q, R),
token
};
module.exports =
{
m5
};

View File

@ -0,0 +1,104 @@
import re
import time
import requests
import json
session = requests.session()
headers = {
'authority': 'match.yuanrenxue.cn',
'pragma': 'no-cache',
'cache-control': 'no-cache',
'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
'accept': 'application/json, text/javascript, */*; q=0.01',
'x-requested-with': 'XMLHttpRequest',
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
# 'user-agent': 'yuanrenxue.project',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://match.yuanrenxue.cn/match/14',
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
}
session.headers = headers
class Yrx14(object):
def __init__(self):
self.m = "http://127.0.0.1:4001/m"
self.v14_v142 = "http://127.0.0.1:4002/v14_v142"
self.sum_value = 0
def get_v14_v142(self, js_code):
data = {
'js_code': str(js_code)
}
req = requests.post(self.v14_v142, data=data)
v14 = re.findall(r'window\[\"v14\"\] = \"(.*)\";', req.text)[0]
v142 = re.findall(r'window\[\"v142\"\] = \"(.*)\";', req.text)[0]
return v14, v142
def get_m(self, c, e, page, timestamp):
data = {
'c': str(c),
'e': str(e),
'page': str(page),
'timestamp': str(timestamp)
}
req = requests.post(self.m, data=data)
m = req.text
return m
def get_task(self, page):
url = "https://match.yuanrenxue.cn/api/match/14/m"
mz = 'TW96aWxsYSxOZXRzY2FwZSw1LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM' \
'2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEyMC4wLjAuMCBTYWZhcmkvNTM3LjM2LFtvYmplY3QgTmV0d29ya0' \
'luZm9ybWF0aW9uXSx0cnVlLCxbb2JqZWN0IEdlb2xvY2F0aW9uXSw4LHpoLUNOLHpoLUNOLHpoLGVuLDAsW29iamVjd' \
'CBNZWRpYUNhcGFiaWxpdGllc10sW29iamVjdCBNZWRpYVNlc3Npb25dLFtvYmplY3QgTWltZVR5cGVBcnJheV0sdHJ1' \
'ZSxbb2JqZWN0IFBlcm1pc3Npb25zXSxXaW4zMixbb2JqZWN0IFBsdWdpbkFycmF5XSxHZWNrbywyMDAzMDEwNyxbb2J' \
'qZWN0IFVzZXJBY3RpdmF0aW9uXSxNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0KSBBcHBsZV' \
'dlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvMTIwLjAuMC4wIFNhZmFyaS81MzcuMzYsR29vZ' \
'2xlIEluYy4sLFtvYmplY3QgRGVwcmVjYXRlZFN0b3JhZ2VRdW90YV0sW29iamVjdCBEZXByZWNhdGVkU3RvcmFnZVF1' \
'b3RhXSw4MjQsMCwwLDE1MzYsMjQsODY0LFtvYmplY3QgU2NyZWVuT3JpZW50YXRpb25dLDI0LDE1MzYsW29iamVjdCB' \
'ET01TdHJpbmdMaXN0XSxmdW5jdGlvbiBhc3NpZ24oKSB7IFtuYXRpdmUgY29kZV0gfSwsbWF0Y2gueXVhbnJlbnh1ZS' \
'5jbixtYXRjaC55dWFucmVueHVlLmNuLGh0dHBzOi8vbWF0Y2gueXVhbnJlbnh1ZS5jbi9tYXRjaC8xNCxodHRwczovL' \
'21hdGNoLnl1YW5yZW54dWUuY24sL21hdGNoLzE0LCxodHRwczosZnVuY3Rpb24gcmVsb2FkKCkgeyBbbmF0aXZlIGNv' \
'ZGVdIH0sZnVuY3Rpb24gcmVwbGFjZSgpIHsgW25hdGl2ZSBjb2RlXSB9LCxmdW5jdGlvbiB0b1N0cmluZygpIHsgW25' \
'hdGl2ZSBjb2RlXSB9LGZ1bmN0aW9uIHZhbHVlT2YoKSB7IFtuYXRpdmUgY29kZV0gfQ=='
cookies = {
'mz': mz,
'sessionid': 'x6ye0o1lse9jum0yqwr9osxpemnac3pv'
}
response = session.get(url, cookies=cookies)
v14, v142 = self.get_v14_v142(response.text)
print(v14, v142)
timestamp = int(time.time()) * 1000
m = self.get_m(v14, v142, page, timestamp)
# m = self.get_m('sekrb09dy6p8', '36090782441', page, 1704951658000)
print(m)
url = f"https://match.yuanrenxue.cn/api/match/14?page={page}"
cookies = {
'mz': mz,
'm': m,
'sessionid': 'x6ye0o1lse9jum0yqwr9osxpemnac3pv'
}
req = session.get(url, cookies=cookies)
return req.text
def run(self):
for page in range(1, 6):
res_dict = json.loads(self.get_task(page))
print(res_dict)
for j in res_dict.get('data'):
self.sum_value += j.get('value')
print(self.sum_value)
if __name__ == '__main__':
a = Yrx14()
a.run()

View File

@ -0,0 +1,21 @@
const express = require('express');
const app = express();
const encryption = require("./gee");
var bodyParser = require('body-parser');
app.use(bodyParser());
app.post('/m', function (req, res) {
let result = req.body;
let c = result.c;
let e = result.e;
let page = result.page;
let timestamp = result.timestamp;
console.log(c, e);
result = encryption.res_m(c, e, page, timestamp);
res.send(result.toString());
});
app.listen(4001, () => {
console.log("开启服务,端口 4001")
});

View File

@ -0,0 +1,17 @@
const express = require('express');
const app = express();
const encryption = require("./ast处理混淆");
var bodyParser = require('body-parser');
app.use(bodyParser());
app.post('/v14_v142', function (req, res) {
let result = req.body;
let js_code = result.js_code;
result = encryption.v14_v142(js_code);
res.send(result.toString());
});
app.listen(4002, () => {
console.log("开启服务,端口 4002")
});

View File

@ -0,0 +1,3 @@
if (m5['toString']()['indexOf']("\n") != -1){
};