美团商家端 字符验证码 分析
声明:
本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!
有相关问题请第一时间头像私信联系我删除博客!
逆向分析
补环境代理
function get_enviroment(proxy_array) { for (var i = 0; i < proxy_array.length; i++) { handler = '{\n' + ' get: function(target, property, receiver) {\n' + ' console.log("方法:", "get ", "对象:", ' + '"' + proxy_array[i] + '" ,' + '" 属性:", property, ' + '" 属性类型:", ' + 'typeof property, ' + // '" 属性值:", ' + 'target[property], ' + '" 属性值类型:", typeof target[property]);\n' + ' return target[property];\n' + ' },\n' + ' set: function(target, property, value, receiver) {\n' + ' console.log("方法:", "set ", "对象:", ' + '"' + proxy_array[i] + '" ,' + '" 属性:", property, ' + '" 属性类型:", ' + 'typeof property, ' + // '" 属性值:", ' + 'target[property], ' + '" 属性值类型:", typeof target[property]);\n' + ' return Reflect.set(...arguments);\n' + ' }\n' + '}' eval('try{\n' + proxy_array[i] + ';\n' + proxy_array[i] + '=new Proxy(' + proxy_array[i] + ', ' + handler + ')}catch (e) {\n' + proxy_array[i] + '={};\n' + proxy_array[i] + '=new Proxy(' + proxy_array[i] + ', ' + handler + ')}') } } // get_enviroment(proxy_array)
部分补环境代码
History = function () { } Object.defineProperties(History.prototype, { [Symbol.toStringTag]: { value: "History", writable: true, enumerable: false, configurable: true } }) history = { length: 4, scrollRestoration: "auto", state: null, } Object.defineProperty(window, 'queueMicrotask', { configurable: true, enumerable: true, value: function queueMicrotask(){}, writable: true }) Object.defineProperty(window, 'structuredClone', { configurable: true, enumerable: true, value: function structuredClone(){}, writable: true }) Object.defineProperty(window, 'crypto', { configurable: true, enumerable: true, get:function crypto() { return {subtle:{}} }, set:undefined }) window.matchMedia = function (val) { console.log('window.matchMedia', arguments) if (val == '(min-width: 1535px)') { return { matches: false, media: val, onchange: null, } } debugger; } this.func_set_natvie(window.matchMedia) Object.defineProperty(window,'DOMParser', { configurable: true, enumerable: false, value: function DOMParser() { }, writable: false }) Object.defineProperty(window,'fetch', { configurable: true, enumerable: false, value: function fetch() { }, writable: true }) 扣代码调用加密
_token = decodeURIComponent(atob(env)) _token = window.q3(_token,request_code,false)