Files
bot_Tamiseur/utilsCrack/repo.js
2023-05-28 02:55:30 +02:00

13 lines
536 B
JavaScript

const iconv = require('iconv-lite')
module.exports = repo = (async (game, headers) => {
let body = await fetch(game.link, { headers, body: null, method: "GET" })
.then(response => response.arrayBuffer())
.then(arrayBuffer => { return iconv.decode(Buffer.from(arrayBuffer), 'win1251') })
.catch(console.error)
try {
let name = body.split('https://uploads.online-fix.me:2053/torrents/')[1].split('"')[0]
let url = `https://uploads.online-fix.me:2053/torrents/${name}`
return url
} catch (error) { console.error(error) }
})