Terabox Download ( Not Limit )
JavaScriptPublicby zx-apiJul 29, 2026, 08:30 AMExpires: Never92 views
1/**
2 *
3 * Name Scrape: Terabox Download + Anti Limit
4 * By Zx
5 * Saluran Edmin: https://whatsapp.com/channel/0029Vb6P2e1E50UZYaX4wI0W
6 * Website Download Video: https://savenest.web.id
7 *
8*/
9
10const axios = require('axios');
11
12function generateRandomFingerprint() {
13 const cpuList = [4, 8, 12, 16];
14 const ramList = [4, 8, 16, 32];
15 const rendererList = [
16 "ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 Direct3D11 vs_5_0 ps_5_0, D3D11)",
17 "ANGLE (AMD, AMD Radeon Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)",
18 "ANGLE (Intel, Intel(R) Iris(R) Xe Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)",
19 "Mali-G57 MC2",
20 "Adreno (TM) 610"
21 ];
22
23 const isMobile = Math.random() > 0.5;
24
25 return {
26 cpu: cpuList[Math.floor(Math.random() * cpuList.length)],
27 memory: ramList[Math.floor(Math.random() * ramList.length)],
28 touch: isMobile ? Math.floor(Math.random() * 5) + 1 : 0,
29 platform: isMobile ? "Linux armv81" : "Win32",
30 lang: "id-ID",
31 vendor: "Google Inc.",
32 webgl_vendor: "Google Inc. (NVIDIA)",
33 webgl_renderer: rendererList[Math.floor(Math.random() * rendererList.length)],
34 // Acak User-Agent sesuai platform
35 ua: isMobile
36 ? 'Mozilla/5.0 (Linux; Android 13; CPH2565) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36'
37 : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
38 backup_token: null
39 };
40}
41
42const mergeCookies = (newCookieHeaders, currentCookies = '') => {
43 if (!newCookieHeaders) return currentCookies;
44 const newCookiesStr = newCookieHeaders.map(c => c.split(';')[0].trim()).join('; ');
45 return currentCookies ? `${currentCookies}; ${newCookiesStr}` : newCookiesStr;
46};
47
48async function scrapeTerabox(targetUrl) {
49 const baseUrl = 'https://flowvideoplayer.com';
50 const fingerprint = generateRandomFingerprint();
51
52 console.log("๐ Menggunakan Fingerprint Acak:");
53 console.log(` - Platform : ${fingerprint.platform}`);
54 console.log(` - CPU/RAM : ${fingerprint.cpu} Core / ${fingerprint.memory} GB`);
55 console.log(` - GPU : ${fingerprint.webgl_renderer}`);
56
57 try {
58 const homeResponse = await axios.get(baseUrl, {
59 headers: { 'Accept': 'text/html', 'User-Agent': fingerprint.ua }
60 });
61
62 const csrfMatch = homeResponse.data.match(/<meta name="csrf-token" content="([^"]+)">/);
63 if (!csrfMatch) throw new Error("CSRF token tidak ditemukan.");
64
65 const csrfToken = csrfMatch[1];
66 let cookies = mergeCookies(homeResponse.headers['set-cookie']);
67
68 const apiHeaders = {
69 'Content-Type': 'application/json',
70 'Accept': 'application/json',
71 'X-Requested-With': 'XMLHttpRequest',
72 'X-CSRF-TOKEN': csrfToken,
73 'Origin': baseUrl,
74 'Referer': `${baseUrl}/`,
75 'User-Agent': fingerprint.ua,
76 'Sec-Fetch-Site': 'same-origin',
77 'Sec-Fetch-Mode': 'cors',
78 'Sec-Fetch-Dest': 'empty'
79 };
80
81 const initResponse = await axios.post(`${baseUrl}/device/init`, JSON.stringify(fingerprint), {
82 headers: { ...apiHeaders, 'Cookie': cookies }
83 });
84
85 if (initResponse.data.status !== true) {
86 throw new Error("Gagal init device: " + (initResponse.data.message || 'Unknown error'));
87 }
88
89 cookies = mergeCookies(initResponse.headers['set-cookie'], cookies);
90
91 const searchResponse = await axios.post(`${baseUrl}/telegram/bot/search/video`, JSON.stringify({ url: targetUrl }), {
92 headers: { ...apiHeaders, 'Cookie': cookies }
93 });
94
95 if (!searchResponse.data.status || !searchResponse.data.response || searchResponse.data.response.length === 0) {
96 throw new Error(searchResponse.data.message || 'Data video kosong');
97 }
98 const videoInfo = searchResponse.data.response[0];
99
100 const downloadResponse = await axios.post(`${baseUrl}/video/download`, JSON.stringify({ url: videoInfo.download_url }), {
101 headers: { ...apiHeaders, 'Cookie': cookies }
102 });
103
104 if (!downloadResponse.data.status) throw new Error("Gagal generate final link.");
105
106 return {
107 success: true,
108 fileName: videoInfo.file_name,
109 fileSize: videoInfo.file_size,
110 streamUrl: videoInfo.fast_stream_url,
111 finalDownloadUrl: downloadResponse.data.download_url,
112 downloadsRemaining: downloadResponse.data.downloads_remaining || initResponse.data.downloads_remaining
113 };
114
115 } catch (error) {
116 const errorMsg = error.response ? `HTTP ${error.response.status} - ${JSON.stringify(error.response.data)}` : error.message;
117 return { success: false, message: errorMsg };
118 }
119}
120
121const urlTerabox = "https://1024terabox.com/s/1k2Qxwebz3yI09kubXBf2xA";
122
123console.log(`๐ Memulai scraping untuk: ${urlTerabox}\n`);
124
125scrapeTerabox(urlTerabox).then(result => {
126 if (result.success) {
127 console.log("\nโ
BERHASIL!");
128 console.log("Judul File :", result.fileName);
129 console.log("Ukuran :", result.fileSize);
130 console.log("Sisa Limit :", result.downloadsRemaining);
131 console.log("\nLink Stream :\n", result.streamUrl);
132 console.log("\nLink Download:\n", result.finalDownloadUrl);
133 } else {
134 console.log("\nโ GAGAL:", result.message);
135 }
136});
137137 linesยท5,669 charsยท5.5 KB
WwrapยทFfullscreen