Created
May 12, 2025 15:19
-
-
Save Timpson2007/1af0f205c0fbea4a9ecf873938d44307 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch from 'node-fetch'; | |
const SESSION = 'yAM8cv8cMSv7RyPiF_E3_OhrpcXskmBdLAs_4NLK12eUS65Og2eSLQPThfliK2Whaayc9txrhgTl8iwJS60J0H9B1NWcXJsDvqllJLzf-DAHmrFLoj1ao6UduVys1FopJpibyE1MPaqn7caqIlQdTA'; | |
const INTERVAL_MINUTES = 18; | |
const JITTER_MINUTES = 4; | |
const SUBSTITUTION_MINUTES = [30, 60, 90, 120, 150, 180]; | |
let totalNormal = 0; | |
let totalSpoof = 0; | |
function sleep(ms) { | |
return new Promise(r => setTimeout(r, ms)); | |
} | |
async function collectDust(offsetMin = 0) { | |
const timestamp = Math.floor(Date.now() / 1000) - (offsetMin * 60); | |
const headers = { | |
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', | |
'User-Agent': 'Mozilla/5.0', | |
'X-Client-Time-Diff': `${timestamp}-0`, | |
'X-Requested-With': 'XMLHttpRequest', | |
'X-Application-Version': '0.9.28' | |
}; | |
try { | |
const res = await fetch('https://api.tonverse.app/galaxy/collect', { | |
method: 'POST', | |
headers, | |
body: `session=${SESSION}` | |
}); | |
const txt = await res.text(); | |
const json = JSON.parse(txt); | |
const dust = json?.response?.dust || 0; | |
return dust; | |
} catch (e) { | |
console.error('Ошибка запроса:', e.message); | |
return 0; | |
} | |
} | |
async function mainLoop() { | |
while (true) { | |
const now = new Date().toLocaleTimeString(); | |
console.log(`\n🔁 Цикл: ${now}`); | |
const normal = await collectDust(); | |
totalNormal += normal; | |
console.log(`✔️ Обычный сбор: ${normal}`); | |
let cycleSpoof = 0; | |
for (const minutes of SUBSTITUTION_MINUTES) { | |
const amount = await collectDust(minutes); | |
totalSpoof += amount; | |
cycleSpoof += amount; | |
console.log(`🕒 Подмена ${minutes} мин назад: ${amount}`); | |
if (amount === 0) { | |
console.log('⏳ Пауза 5 сек — слишком частые подмены?'); | |
await sleep(5000); | |
} else { | |
await sleep(2000); | |
} | |
} | |
console.log(`\n📊 Всего: обычный — ${totalNormal}, подмены — ${totalSpoof}, за цикл — ${cycleSpoof}`); | |
const delay = (INTERVAL_MINUTES + Math.random() * JITTER_MINUTES) * 60 * 1000; | |
console.log(`⏱ Следующий запуск через ${(delay / 60000).toFixed(2)} мин`); | |
await sleep(delay); | |
} | |
} | |
mainLoop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment