首页 > 其他分享 >psSign、random推导

psSign、random推导

时间:2025-01-16 11:54:46浏览次数:1  
标签:0x0 0xb659b6 推导 0x36c5d3 random 0x46b693 0x3b9660 var psSign

入口:
image

传递的参数值:
image

sign函数

function() {
	var _0x36c5d3 = _0x79c1ce;
	let _0x479298 = arguments[_0x36c5d3(0x5a9, 'PHXL')] > 0x0 && void 0x0 !== arguments[0x0] ? arguments[0x0] : {};
	try {
		var _0x1a6f66;
		if (!_0x32d6a8[_0x36c5d3(0x4d7, 'l!Uo')][_0x36c5d3(0x3a7, 'yS(K')]) return _0x347d76[_0x36c5d3(0x514, 'j7Mt')][_0x36c5d3(0x323, 'a$#V')](_0x36c5d3(0x543, 'XEk5'), {
			'reason': _0x36c5d3(0x56a, 'an)q')
		}),
		Promise[_0x36c5d3(0x3cd, 'aSrl')]({});
		const _0x48393f = (0x0, _0xbae138[_0x36c5d3(0x5fd, 't[mc')])(),
		_0x4085c6 = '' [_0x36c5d3(0x536, 'J0hY')](Date[_0x36c5d3(0x37b, 'aO!D')]());
		let _0x3a0e53 = _0x479298;
		_0x36c5d3(0x230, 'R90F') != typeof _0x479298 && (_0x3a0e53 = {});
		const _0x209c05 = _0x4438f3(_0x4438f3({},
		_0x3a0e53), {},
		{
			'random': _0x48393f,
			'timestamp': _0x4085c6
		}),
		_0x2c4733 = JSON[_0x36c5d3(0x44c, '3z04')](_0x209c05) + (0x0, _0x167d7d[_0x36c5d3(0x5a5, 'hjcQ')])();
		return (null === (_0x1a6f66 = (0x0, _0x438ffe[_0x36c5d3(0x40b, 'J0hY')])(_0x2c4733)) || void 0x0 === _0x1a6f66 ? void 0x0: _0x1a6f66[_0x36c5d3(0x44d, '$@]b')](function(_0x1eacf4) {
			return {
				'pcSign': _0x1eacf4 || '',
				'random': _0x48393f,
				'timestamp': _0x4085c6
			};
		})) || Promise[_0x36c5d3(0x266, 'aO!D')]({});
	} catch(_0x51361c) {
		return _0x347d76[_0x36c5d3(0x57d, 'PR!R')][_0x36c5d3(0x4b0, 'JEGu')](_0x36c5d3(0x21d, 'UAr['), {
			'reason': '' [_0x36c5d3(0x4de, 'gf^x')](_0x51361c)
		}),
		Promise[_0x36c5d3(0x629, '7n#R')]({});
	}
}

定位security.SDK.umd.js

            _0x10bdff[_0x79c1ce(0x475, '[wa(')] = function() {
                var _0x36c5d3 = _0x79c1ce;
                let _0x479298 = arguments[_0x36c5d3(0x5a9, 'PHXL')] > 0x0 && void 0x0 !== arguments[0x0] ? arguments[0x0] : {};
                try {
                    var _0x1a6f66;
                    if (!_0x32d6a8[_0x36c5d3(0x4d7, 'l!Uo')][_0x36c5d3(0x3a7, 'yS(K')])
                        return _0x347d76[_0x36c5d3(0x514, 'j7Mt')][_0x36c5d3(0x323, 'a$#V')](_0x36c5d3(0x543, 'XEk5'), {
                            'reason': _0x36c5d3(0x56a, 'an)q')
                        }),
                        Promise[_0x36c5d3(0x3cd, 'aSrl')]({});
                    const _0x48393f = (0x0,
                    _0xbae138[_0x36c5d3(0x5fd, 't[mc')])()
                      , _0x4085c6 = ''[_0x36c5d3(0x536, 'J0hY')](Date[_0x36c5d3(0x37b, 'aO!D')]());
                    let _0x3a0e53 = _0x479298;
                    _0x36c5d3(0x230, 'R90F') != typeof _0x479298 && (_0x3a0e53 = {});
                    const _0x209c05 = _0x4438f3(_0x4438f3({}, _0x3a0e53), {}, {
                        'random': _0x48393f,
                        'timestamp': _0x4085c6
                    })
                      , _0x2c4733 = JSON[_0x36c5d3(0x44c, '3z04')](_0x209c05) + (0x0,
                    _0x167d7d[_0x36c5d3(0x5a5, 'hjcQ')])();
                    return (null === (_0x1a6f66 = (0x0,
                    _0x438ffe[_0x36c5d3(0x40b, 'J0hY')])(_0x2c4733)) || void 0x0 === _0x1a6f66 ? void 0x0 : _0x1a6f66[_0x36c5d3(0x44d, '$@]b')](function(_0x1eacf4) {
                        return {
                            'pcSign': _0x1eacf4 || '',
                            'random': _0x48393f,
                            'timestamp': _0x4085c6
                        };
                    })) || Promise[_0x36c5d3(0x266, 'aO!D')]({});
                } catch (_0x51361c) {
                    return _0x347d76[_0x36c5d3(0x57d, 'PR!R')][_0x36c5d3(0x4b0, 'JEGu')](_0x36c5d3(0x21d, 'UAr['), {
                        'reason': ''[_0x36c5d3(0x4de, 'gf^x')](_0x51361c)
                    }),
                    Promise[_0x36c5d3(0x629, '7n#R')]({});
                }
            }
            ;
            const _0x32d6a8 = _0x535b3(0x53)
              , _0xbae138 = _0x535b3(0xfd)
              , _0x167d7d = _0x535b3(0x3ba)
              , _0x438ffe = _0x535b3(0x1b5)
              , _0x347d76 = _0x535b3(0x2a4);
        },

打断点调试
1.
image
image
image

image

此时拿到random(_0x48393f)的值

const _0x48393f = (0x0,_0xbae138[_0x36c5d3(0x5fd, 't[mc')])(), _0x4085c6 = ''[_0x36c5d3(0x536, 'J0hY')](Date[_0x36c5d3(0x37b, 'aO!D')]());

根据上述函数,已知函数标量_0x36c5d3
image

function(_0x457ace, _0x349832) {
	_0x457ace = _0x457ace - 0x18a;
	var _0x4c6e1a = _0x19971f[_0x457ace];
	if (a0_0x457a['pIaRKj'] === undefined) {
		var _0x2a073e = function(_0x3f86c9) {
			var _0x153ef8 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
			var _0x6873a5 = '',
			_0x41c8da = '';
			for (var _0x5c7b8d = 0x0,
			_0x27fa83, _0x3f32c6, _0xef38ce = 0x0; _0x3f32c6 = _0x3f86c9['charAt'](_0xef38ce++);~_0x3f32c6 && (_0x27fa83 = _0x5c7b8d % 0x4 ? _0x27fa83 * 0x40 + _0x3f32c6: _0x3f32c6, _0x5c7b8d++%0x4) ? _0x6873a5 += String['fromCharCode'](0xff & _0x27fa83 >> ( - 0x2 * _0x5c7b8d & 0x6)) : 0x0) {
				_0x3f32c6 = _0x153ef8['indexOf'](_0x3f32c6);
			}
			for (var _0x56ffc6 = 0x0,
			_0x2026b1 = _0x6873a5['length']; _0x56ffc6 < _0x2026b1; _0x56ffc6++) {
				_0x41c8da += '%' + ('00' + _0x6873a5['charCodeAt'](_0x56ffc6)['toString'](0x10))['slice']( - 0x2);
			}
			return decodeURIComponent(_0x41c8da);
		};
		var _0x384326 = function(_0x5a7df8, _0x68a587) {
			var _0x46b693 = [],
			_0xb659b6 = 0x0,
			_0x38697a,
			_0x299539 = '';
			_0x5a7df8 = _0x2a073e(_0x5a7df8);
			var _0x3b9660;
			for (_0x3b9660 = 0x0; _0x3b9660 < 0x100; _0x3b9660++) {
				_0x46b693[_0x3b9660] = _0x3b9660;
			}
			for (_0x3b9660 = 0x0; _0x3b9660 < 0x100; _0x3b9660++) {
				_0xb659b6 = (_0xb659b6 + _0x46b693[_0x3b9660] + _0x68a587['charCodeAt'](_0x3b9660 % _0x68a587['length'])) % 0x100,
				_0x38697a = _0x46b693[_0x3b9660],
				_0x46b693[_0x3b9660] = _0x46b693[_0xb659b6],
				_0x46b693[_0xb659b6] = _0x38697a;
			}
			_0x3b9660 = 0x0,
			_0xb659b6 = 0x0;
			for (var _0x271a01 = 0x0; _0x271a01 < _0x5a7df8['length']; _0x271a01++) {
				_0x3b9660 = (_0x3b9660 + 0x1) % 0x100,
				_0xb659b6 = (_0xb659b6 + _0x46b693[_0x3b9660]) % 0x100,
				_0x38697a = _0x46b693[_0x3b9660],
				_0x46b693[_0x3b9660] = _0x46b693[_0xb659b6],
				_0x46b693[_0xb659b6] = _0x38697a,
				_0x299539 += String['fromCharCode'](_0x5a7df8['charCodeAt'](_0x271a01) ^ _0x46b693[(_0x46b693[_0x3b9660] + _0x46b693[_0xb659b6]) % 0x100]);
			}
			return _0x299539;
		};
		a0_0x457a['mlzgZn'] = _0x384326,
		_0x348322 = arguments,
		a0_0x457a['pIaRKj'] = !![];
	}
	var _0x2a2c40 = _0x19971f[0x0],
	_0x17806e = _0x457ace + _0x2a2c40,
	_0x4fed40 = _0x348322[_0x17806e];
	return ! _0x4fed40 ? (a0_0x457a['kveOFi'] === undefined && (a0_0x457a['kveOFi'] = !![]), _0x4c6e1a = a0_0x457a['mlzgZn'](_0x4c6e1a, _0x349832), _0x348322[_0x17806e] = _0x4c6e1a) : _0x4c6e1a = _0x4fed40,
	_0x4c6e1a;
}

拆解0x48393f构成
image
image

image

  1. 解析_0x4085c6的生成
 _0x4085c6 = ''[_0x36c5d3(0x536, 'J0hY')](Date[_0x36c5d3(0x37b, 'aO!D')]())

image

继续对function(_0x457ace, _0x349832),即_0x36c5d3函数打断点
image
image

image

标签:0x0,0xb659b6,推导,0x36c5d3,random,0x46b693,0x3b9660,var,psSign
From: https://www.cnblogs.com/Gimm/p/18674667

相关文章

  • 抛物流线参数化方程推导——从几何性质到代码实现
    抛物流线参数化方程推导——从几何性质到代码实现一、抛物流线几何性质抛物线的准线过焦点的垂线称为抛物线的轴,轴与抛物线的交点称为抛物线的顶点。设\(FP=\rho\),\(\angleOFP=\theta\),抛物线的焦点为\(F\),定点为\(O\),焦准距为\(p\).如上图所示,当\(\theta>90......
  • 变分法推导01
    01变分法起源最速下降问题:求小球从点A到点B用时最短(注:非空间距离最短)的曲线是哪一个?答案:沿着摆线下降速度最快。最小作用量原理引出:以初速度\(\V_0\)抛出的物体,末速度为\(\V\)。为什么会沿着曲线A的轨迹运动,而不是曲线B和曲线C进行运动?答:(1)从牛顿力学出发,轨迹是A(2)从......
  • Python 中的列表推导式详解
    Python中的列表推导式详解列表推导式(ListComprehension)是Python提供的一种简洁而优雅的生成列表的方式。它能够在一行代码中完成循环与条件判断,使代码更加直观和易读。本文将从基础到进阶,带你全面了解列表推导式的用法。基本语法列表推导式的基本语法为:[表达式for......
  • [ABC216H] Random Robots
    [ABC216H]RandomRobots题意有\(k\)个机器人在数轴上,位置分别是\(x_1,x_2,\dots,x_k\),\(x\)均为整数.接下来\(n\)秒,每秒每个机器人有\(\dfrac{1}{2}\)的概率不动,\(\dfrac{1}{2}\)的概率往坐标轴正方向移动一个单位距离,机器人的移动同时进行.求机器人互相......
  • random.choice() 和 random.random.choices()的用法区别
    random.choice()和random.choices()是Python标准库random模块中用于随机选择的两个函数,但它们的用法和功能有所不同。random.choice()random.choice()用于从一个非空序列(如列表、元组或字符串)中随机选择一个元素。语法random.choice(seq)seq:一个非空序列。示例i......
  • 【重要】random随机库函数用法示例
    根据以下列表,从序号、函数名、用途、示例,用表格显示每个函数的信息['betavariate','choice','choices','expovariate','gammavariate','gauss','getrandbits','getstate','lognormvariate','nor......
  • UserCryptoManager.getRandomValues
    UserCryptoManager.getRandomValues(Objectobject)基础库2.17.3开始支持,低版本需做兼容处理。以Promise风格调用:不支持小程序插件:不支持相关文档:小程序加密网络通道功能描述获取密码学安全随机数参数Objectobject属性类型默认值必填说明lengt......
  • 3 有限体积法:推导方程
    3有限体积法:推导方程基本原理和目标(注意:这一节看不懂没关系,在后面的推导中会慢慢用到)质量、动量和能量的守恒流体的质量守恒动量改变的速度=一个流体粒子上受到的力的总和(牛顿第二定律)能量改变的速度=一个流体粒子吸收的热量,和作用在其上的功的总和(热力学第一定律)......
  • 3 有限体积法:推导方程
    3有限体积法:推导方程基本原理和目标(注意:这一节看不懂没关系,在后面的推导中会慢慢用到)质量、动量和能量的守恒流体的质量守恒动量改变的速度=一个流体粒子上受到的力的总和(牛顿第二定律)能量改变的速度=一个流体粒子吸收的热量,和作用在其上的功的总和(热力学第一定律)......
  • 解释下`(~~(Math.random()*(1<<24)))`的含义
    这段代码(~~(Math.random()*(1<<24)))在前端开发中可能用于生成一个随机整数。下面我们来分解这段代码,以更好地理解其含义:Math.random():这个函数返回一个[0,1)之间的随机浮点数,也就是说,它会返回一个大于等于0且小于1的随机小数。1<<24:这是一个位移运算。1左移24位,等......