wolfyflutter

64. ytmp3.cx, ytmp3.as, y2mate.nu, [youtube] [downloader] [audio] [video]

Oct 13th, 2025 (edited)
338
1
Never
12
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 5.88 KB | Source Code | 1 0
  1. /*
  2.   base    : https://ytmp3.cx || https://ytmp3.as || https://y2mate.nu
  3.   update  : 14 Oktober 2025
  4.   by      : wolep
  5.   node    : v24.5.0
  6.   note    : buat download mp3, mp4 dari
  7.             youtube biasa, youtube short
  8.             dan youtube music
  9.             support esm dan cjs
  10. */
  11.  
  12. const yt = {
  13.  
  14.     get url() {
  15.         return {
  16.             origin: 'https://ytmp3.cx' //ganti base boleh (list base ad di note atas)
  17.         }
  18.     },
  19.  
  20.     get baseHeaders() {
  21.         return {
  22.             'accept-encoding': 'gzip, deflate, br, zstd'
  23.         }
  24.     },
  25.  
  26.     extractVideoId: function (fV) {
  27.         let v
  28.         if (fV.indexOf('youtu.be') > -1) {
  29.             v = /\/([a-zA-Z0-9\-\_]{11})/.exec(fV);
  30.         } else if (fV.indexOf('youtube.com') > -1) {
  31.             if (fV.indexOf('/shorts/') > -1) {
  32.                 v = /\/([a-zA-Z0-9\-\_]{11})/.exec(fV);
  33.             } else {
  34.                 v = /v\=([a-zA-Z0-9\-\_]{11})/.exec(fV);
  35.             }
  36.         }
  37.         const result = v?.[1]
  38.         if (!result) throw Error(`gagal extract video id`)
  39.         return result
  40.     },
  41.  
  42.     getInitUrl: async function () {
  43.         "use strict"
  44.         try {
  45.             const r1 = await fetch(this.url.origin, { headers: this.baseHeaders })
  46.             console.log('hit homepage')
  47.  
  48.             const html = await r1.text()
  49.             const jsPath = html.match(/<script src="(.+?)"/)?.[1]
  50.             const jsUrl = this.url.origin + jsPath
  51.  
  52.             const r2 = await fetch(jsUrl, { headers: this.baseHeaders })
  53.             console.log('hit js')
  54.             const js = await r2.text()
  55.  
  56.             // ayo main eval evalan
  57.  
  58.             // cari gB
  59.             const gB_m = js.match(/gB=(.+?),gD/)?.[1]
  60.             const gB = eval(gB_m)
  61.  
  62.             // cari gC
  63.             const html_m = html.match(/<script>(.+?)<\/script>/)?.[1]
  64.             const hiddenGc = eval(html_m + "gC")
  65.             const gC = Object.fromEntries(Object.getOwnPropertyNames(hiddenGc).map(key => [key, hiddenGc[key]]))
  66.  
  67.             // fungsi
  68.             const decodeBin = (d) => d.split(' ').map(v => parseInt(v, 2))
  69.             const decodeHex = (d) => d.match(/0x[a-fA-F0-9]{2}/g).map(v => String.fromCharCode(v)).join("")
  70.             const getTimestamp = () => Math.floor((new Date).getTime() / 1e3)
  71.  
  72.             function authorization() {
  73.                 var dec = decodeBin(gC.d(1)[0]);
  74.                 var k = '';
  75.                 for (var i = 0; i < dec.length; i++) k += (gC.d(2)[0] > 0) ? atob(gC.d(1)[1]).split('').reverse().join('')[(dec[i] - gC.d(2)[1])] : atob(gC.d(1)[1])[(dec[i] - gC.d(2)[1])];
  76.                 if (gC.d(2)[2] > 0) k = k.substring(0, gC.d(2)[2]);
  77.                 switch (gC.d(2)[3]) {
  78.                     case 0:
  79.                         return btoa(k + '_' + decodeHex(gC.d(3)[0]));
  80.                     case 1:
  81.                         return btoa(k.toLowerCase() + '_' + decodeHex(gC.d(3)[0]));
  82.                     case 2:
  83.                         return btoa(k.toUpperCase() + '_' + decodeHex(gC.d(3)[0]));
  84.                 }
  85.             }
  86.  
  87.             const api_m = js.matchAll(/};var \S{1}=(.+?);gR&&\(/g)
  88.             const e = Array.from(api_m)?.[1]?.[1]
  89.             const apiUrl = eval(`${e}`)
  90.             return apiUrl
  91.         } catch (e) {
  92.             throw new Error('fungsi getApiUrl gagal')
  93.         }
  94.     },
  95.  
  96.     download: async function (url, f = 'mp3') {
  97.         // validation format
  98.         if (!/^mp3|mp4$/.test(f)) throw Error(`format valid mp3 or mp4`)
  99.  
  100.         // extract video id
  101.         const v = this.extractVideoId(url)
  102.  
  103.         const headers = {
  104.             'referer': this.url.origin,
  105.             ...this.baseHeaders
  106.         }
  107.  
  108.         // get init url
  109.         const initApi = await this.getInitUrl()
  110.  
  111.         // hit init
  112.         const r1 = await fetch(initApi, { headers })
  113.         console.log('hit init')
  114.  
  115.         const j1 = await r1.json()
  116.         const { convertURL } = j1
  117.  
  118.         // hit convertURL
  119.         const convertApi = convertURL + '&v=' + v + '&f=' + f + '&_=' + Math.random()
  120.         const r2 = await fetch(convertApi, { headers })
  121.         console.log('hit convert url')
  122.  
  123.         const j2 = await r2.json()
  124.         if (j2.error) {
  125.             throw Error(`ada error di value convert. nih\n${JSON.stringify(j2, null, 2)}`)
  126.         }
  127.  
  128.         if (j2.redirectURL) {
  129.             const r3 = await fetch(j2.redirectURL, { headers })
  130.             console.log('hit redirect')
  131.             const j3 = await r3.json()
  132.             const result = {
  133.                 title: j3.title,
  134.                 downloadURL: j3.downloadURL,
  135.                 format: f
  136.             }
  137.             return result
  138.         } else {
  139.             // luping
  140.             let j3b
  141.             do {
  142.                 const r3b = await fetch(j2.progressURL, { headers })
  143.                 console.log('hit progress')
  144.                 j3b = await r3b.json()
  145.                 if (j3b.error) throw Error(`ada error pas cek progress. nih\n${JSON.stringify(j3b, null, 2)}`)
  146.                 if (j3b.progress == 3) {
  147.                     const result = {
  148.                         title: j3b.title,
  149.                         downloadURL: j2.downloadURL,
  150.                         format: f
  151.                     }
  152.                     return result
  153.                 }
  154.                 await new Promise(resolve => setTimeout(resolve, 3000))
  155.             } while (j3b.error != 3)
  156.         }
  157.     }
  158. }
  159.  
  160. // cara pakai
  161. yt.download('https://www.youtube.com/watch?v=Fmf-G9fpwto', 'mp3')
  162.     .then(console.log)
  163.     .catch(console.log)
  164.  
  165.  
  166. /* output
  167. {
  168.   title: 'Diamond Eyes - Stars | Dubstep | NCS - Copyright Free Music',
  169.   downloadURL: 'https://eoeo.ecoe.cc/api/v1/download?sig=ag0......V%2FEi32wlBWQ%3D%3D',
  170.   format: 'mp3'
  171. }
  172.  
  173.  
  174. atauuuuu.....
  175. yt.download('yt_url', 'mp4') -> untuk download mp4
  176. yt.download('yt_url', 'mp3') -> untuk download mp3
  177. yt.download('yt_url') -> empty param download mp3 juga
  178. */
  179.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Acraxky
    17 hours
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=wgujiohxej
    4.  
    5. 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.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment