Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* base : https://v1.yt1s.biz
- node : vv24.5.0
- note : bisa pilih quality, bisa download by
- search query. liat cara pakai.
- list quality :
- audio : 64kbps, 96kbps, 128kbps, 256kbps, 320kbps
- video : 144p, 240p, 360p, 480p, 720p, 1080p
- input nya video id ya. bukan url lengkap
- by : wolep
- update : 13 november 2025 03:40 wita
- */
- import crypto from "crypto"
- const yt = {
- get baseUrl() {
- return {
- origin: 'https://v2.yt1s.biz',
- }
- },
- get baseHeaders() {
- return {
- "accept": "application/json, text/plain, */*",
- "accept-encoding": "gzip, deflate, br, zstd",
- "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36",
- 'origin': this.baseUrl.origin
- }
- },
- validateString: function (string, description) {
- if (typeof (string) !== 'string' || !string?.trim()?.length) throw Error(`${description} can't be empty`)
- },
- handleFormat: function (userFormat) {
- const validFormat = ['64kbps', '96kbps', '128kbps', '256kbps', '320kbps', '144p', '240p', '360p', '480p', '720p', '1080p']
- if (!validFormat.includes(userFormat)) throw Error(`your format is invalid! just pick one of these. ${validFormat.join(', ')}`)
- const path = /p$/.test(userFormat) ? '/video' : '/audio'
- const quality = userFormat.match(/\d+/)[0]
- return { path, quality }
- },
- hit: async function (description, url, opts, returnType = 'text') {
- try {
- const r = await fetch(url, opts)
- if (!r.ok) throw Error(`${r.status} ${r.statusText} ${await r.text() || 'empty response'}`)
- let data
- if (returnType == 'json') {
- data = r.json()
- } else if (returnType == 'text') {
- data = r.text()
- } else {
- throw Error('invalid return type')
- }
- return { data, headers: r.headers }
- } catch (e) {
- throw Error(`hit gagal. ${description}. ${e.message}`)
- }
- },
- getSessionToken: async function () {
- const headers = this.baseHeaders
- const api = 'https://fast.dlsrv.online/'
- console.log('[getting session token]')
- const { headers: h } = await this.hit('get session', api, { headers })
- const result = h.get('x-session-token')
- if (!result) throw Error('session kosong!')
- return result
- },
- pow: function (session, path, startNonce = 0) {
- let nonce = startNonce
- let powHash = ''
- while (true) {
- const data = `${session}:${path}:${nonce}`
- powHash = crypto.createHash('SHA256').update(data).digest('hex')
- if (powHash.startsWith('0000')) {
- return {
- 'nonce': nonce.toString(),
- 'powHash': powHash
- }
- }
- nonce++
- }
- },
- apiSignature: function (session, path, timestamp) {
- const dataToSign = `${session}:${path}:${timestamp}`
- const secretKey = 'a8d4e2456d59b90c8402fc4f060982aa'
- const result = crypto.createHmac('SHA256', secretKey).update(dataToSign).digest('hex')
- return result
- },
- // fungsi utama
- download: async function (videoId, userFormat = '128kbps') {
- this.validateString(videoId, 'videoId')
- const { path, quality } = this.handleFormat(userFormat)
- const sessionToken = await this.getSessionToken()
- const timestamp = Date.now().toString()
- const signature = this.apiSignature(sessionToken, path, timestamp)
- const { nonce, powHash } = this.pow(sessionToken, path)
- const headers = {
- 'content-type': 'application/json',
- 'x-api-auth': "Ig9CxOQPYu3RB7GC21sOcgRPy4uyxFKTx54bFDu07G3eAMkrdVqXY9bBatu4WqTpkADrQ",
- 'x-session-token': sessionToken,
- 'x-signature': signature,
- 'x-signature-timestamp': timestamp,
- 'nonce': nonce,
- 'powhash': powHash,
- ... this.baseHeaders
- }
- const api = `https://fast.dlsrv.online/gateway${path}`
- const body = JSON.stringify({ videoId, quality })
- //return { headers, body, api }
- console.log('[downloading]')
- const { data: result } = await this.hit('download', api, { headers, body, 'method': 'post' }, 'json')
- return result
- },
- }
- // cara pakai
- yt.download('hTFDlGv2IWg', '128kbps')
- .then(console.log)
- .catch(e => {
- console.log(e)
- })
- /* output
- {
- status: 'tunnel',
- url: 'https://yt1s-worker-1.dlsrv.online/tunnel?id=679......kpzI4HejiqZg5oXbQ',
- filename: 'boy pablo - sick feeling (official video) - 777tv (youtube).mp3',
- duration: 156
- }
- */
Advertisement
Comments
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=mccfohhuko
- This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
- The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
- Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment