Grosse refonte + Ajout /amp + Correctif /crack

This commit is contained in:
Zachary Guénot
2023-05-28 02:55:30 +02:00
parent ef58e007bc
commit 011b0d6d68
17 changed files with 233 additions and 92 deletions

13
utilsCrack/repo.js Normal file
View File

@@ -0,0 +1,13 @@
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) }
})