generaljavascript5617
Ouo.io & Ouo.press - Shortlink Bypass & Target Destination Extractor
Engine bypass dan resolver otomatis untuk shortlink ouo.io dan ouo.press. Menangani proteksi Cloudflare Turnstile, validasi token Adscore, serta countdown timer 2-step secara otomatis tanpa memicu iklan popunder, sekaligus mengekstrak metadata file dan direct video stream.
Vamz Spectre14 Okt 2026306 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/ouo-io-bypass" -o ouo-io-bypass.js
# 2. Jalankan script
node ouo-io-bypass.js
ouo-io-bypass.js(306 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
/**
* ========================================================
* Name: Ouo.io & Ouo.press Shortlink Bypass & Resolver Engine
*
* Cara Download:
* curl -sL "https://code.vamxapi.my.id/snippet/raw/ouo-io-bypass" -o ouo-io-bypass.js
*
* Cara Eksekusi:
* node ouo-io-bypass.js "https://ouo.io/sdg2HV"
* node ouo-io-bypass.js "https://ouo.press/sdg2HV"
*
* Author: Vamz Spectre
* Source: https://vamxapi.my.id
* ========================================================
*/
import fs from 'fs';
import puppeteer from 'puppeteer';
const SUPPORTED_HOSTS = ['ouo.io', 'ouo.press'];
/**
* Validasi dan parsing link ouo.io
*/
function parseOuoUrl(rawUrl) {
let target = (rawUrl || '').trim();
if (!target.startsWith('http://') && !target.startsWith('https://')) {
target = `https://${target}`;
}
let parsed;
try {
parsed = new URL(target);
} catch {
throw new Error(`Format URL tidak valid: "${rawUrl}"`);
}
const hostname = parsed.hostname.toLowerCase().replace(/^www\./, '');
const isSupported = SUPPORTED_HOSTS.some(
(h) => hostname === h || hostname.endsWith(`.${h}`)
);
if (!isSupported) {
throw new Error(
`Domain "${hostname}" tidak didukung. Domain valid: ${SUPPORTED_HOSTS.join(', ')}`
);
}
const slug = parsed.pathname.replace(/^\/+/, '').split('/')[0];
if (!slug) {
throw new Error('Slug ID tautan ouo.io tidak ditemukan dalam URL!');
}
return {
rawUrl: target,
hostname,
slug,
canonicalUrl: `https://ouo.io/${slug}`
};
}
/**
* Ekstraksi metadata tambahan jika tujuan akhir adalah file hoster / streaming
*/
async function extractDestinationMeta(url) {
if (!url || typeof url !== 'string') return null;
try {
if (url.includes('mp4upload.com')) {
const res = await fetch(url, {
headers: {
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36'
}
});
const html = await res.text();
const meta = {};
const titleMatch =
html.match(/<h1 class="filename">([^<]+)<\/h1>/i) ||
html.match(/name="fname" value="([^"]+)"/i);
const sizeMatch = html.match(/<span class="meta-label">Size<\/span>([^<]+)<\/span>/i);
const uploadMatch = html.match(/<span class="meta-label">Uploaded<\/span>([^<]+)<\/span>/i);
const idMatch = url.match(/mp4upload\.com\/(?:embed-)?([a-zA-Z0-9]+)/);
if (titleMatch) meta.file_name = titleMatch[1].trim();
if (sizeMatch) meta.file_size = sizeMatch[1].trim();
if (uploadMatch) meta.uploaded_at = uploadMatch[1].trim();
if (idMatch && idMatch[1]) {
const embedUrl = `https://www.mp4upload.com/embed-${idMatch[1]}.html`;
try {
const embedRes = await fetch(embedUrl, {
headers: {
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36',
Referer: url
}
});
const embedHtml = await embedRes.text();
const videoSrcMatch = embedHtml.match(/src:\s*["'](https:\/\/[^"']+\/video\.mp4)["']/i);
const posterMatch = embedHtml.match(/player\.poster\(["'](https:\/\/[^"']+)["']\)/i);
if (videoSrcMatch) meta.direct_video_url = videoSrcMatch[1];
if (posterMatch) meta.poster_image = posterMatch[1];
meta.embed_url = embedUrl;
} catch {}
}
return meta;
}
} catch {}
return null;
}
/**
* Resolver Utama Ouo.io & Ouo.press
* Menyelesaikan verifikasi Turnstile dan countdown 2-step tanpa memicu iklan popunder
*/
async function bypassOuo(inputUrl, options = {}) {
const parsed = parseOuoUrl(inputUrl);
const chromeCandidates = [
process.env.PUPPETEER_EXECUTABLE_PATH,
'/usr/bin/google-chrome',
'/usr/bin/chromium',
'/usr/bin/chromium-browser'
].filter(Boolean);
const chromePath = chromeCandidates.find((p) => fs.existsSync(p));
const browser = await puppeteer.launch({
headless: options.headless !== undefined ? options.headless : 'new',
...(chromePath ? { executablePath: chromePath } : {}),
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--disable-accelerated-2d-canvas',
'--disable-gpu',
'--disable-blink-features=AutomationControlled'
]
});
try {
const page = await browser.newPage();
await page.setUserAgent(
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36'
);
let destinationUrl = null;
// Monitor response khusus endpoint ouo untuk menangkap 302 redirect asli
page.on('response', (response) => {
const reqUrl = response.url();
const status = response.status();
if (
(reqUrl.includes('/xreallcygo/') || reqUrl.includes('/go/')) &&
status >= 300 &&
status < 400
) {
const loc = response.headers()['location'];
if (loc && !loc.includes('ouo.io') && !loc.includes('ouo.press')) {
destinationUrl = loc;
}
}
});
// Step 1: Kunjungi halaman canonical ouo.io
await page.goto(parsed.canonicalUrl, {
waitUntil: 'networkidle2',
timeout: options.timeout || 35000
});
// Menunggu validasi token / tombol siap
await page
.waitForFunction(
() => {
const btn = document.querySelector('#btn-main');
return btn && !btn.className.includes('disabled');
},
{ timeout: 12000 }
)
.catch(() => {});
// Submit form langkah 1 langsung via DOM untuk mencegah popunder trigger
await Promise.all([
page.waitForNavigation({ waitUntil: 'networkidle2', timeout: 20000 }).catch(() => {}),
page.evaluate(() => {
const form = document.querySelector('form');
if (form) form.submit();
})
]);
// Step 2: Cek apakah masih berada di intermediate step (/go/)
if (!destinationUrl && (page.url().includes('/go/') || (await page.$('#form-go')))) {
// Tunggu countdown timer habis & tombol Get Link aktif
await page
.waitForFunction(
() => {
const btn =
document.querySelector('#btn-main') ||
document.querySelector('button[type="submit"]');
return btn && !btn.className.includes('disabled');
},
{ timeout: 12000 }
)
.catch(() => {});
await new Promise((r) => setTimeout(r, 1200));
// Submit form langkah 2
await Promise.all([
page.waitForNavigation({ waitUntil: 'networkidle2', timeout: 20000 }).catch(() => {}),
page.evaluate(() => {
const form = document.querySelector('#form-go') || document.querySelector('form');
if (form) form.submit();
})
]);
}
const finalTarget = destinationUrl || page.url();
const pageTitle = await page.title().catch(() => '');
if (!finalTarget || finalTarget.includes('ouo.io') || finalTarget.includes('ouo.press')) {
throw new Error('Gagal mendapatkan URL tujuan akhir dari ouo.io.');
}
// Ekstraksi metadata tambahan bila tujuan berupa video player / direct download
const extraMeta = await extractDestinationMeta(finalTarget);
return {
status: true,
original_url: parsed.canonicalUrl,
slug: parsed.slug,
destination_url: finalTarget,
title: pageTitle,
provider: 'ouo.io',
...(extraMeta ? { media_data: extraMeta } : {}),
note: 'Berhasil melewati proteksi Cloudflare Turnstile & countdown timer 2-step'
};
} finally {
await browser.close();
}
}
/**
* Universal Scraper Dispatcher
*/
async function ouo(command, ...rest) {
const clean = (command || '').trim();
if (!clean) {
throw new Error('Parameter input (URL ouo.io atau ouo.press) wajib disertakan!');
}
const lower = clean.toLowerCase();
if (lower === 'bypass' || lower === 'resolve' || lower === 'skip') {
const targetUrl = rest.join(' ').trim();
if (!targetUrl) throw new Error('URL ouo.io wajib disertakan!');
return await bypassOuo(targetUrl);
}
return await bypassOuo(clean);
}
export { ouo, bypassOuo, parseOuoUrl, SUPPORTED_HOSTS };
export default ouo;
/**
* CLI Runner:
* node ouo-io-bypass.js "https://ouo.io/sdg2HV"
*/
const cliArgs = process.argv.slice(2);
const mainCommand = cliArgs[0] ? cliArgs[0].trim() : null;
async function runCli() {
if (!mainCommand) {
console.log(
JSON.stringify(
{
status: false,
message: 'Parameter URL ouo.io belum ditentukan.',
usage: 'node ouo-io-bypass.js <url_ouo>',
supported_domains: SUPPORTED_HOSTS,
example: 'node ouo-io-bypass.js "https://ouo.io/sdg2HV"'
},
null,
2
)
);
process.exit(1);
}
const res = await ouo(mainCommand, ...cliArgs.slice(1));
console.log(JSON.stringify(res, null, 2));
}
if (process.argv[1] && (process.argv[1].endsWith('ouo-io-bypass.js') || process.argv[1].endsWith('ouo-io-bypass.cjs'))) {
runCli().catch((err) => {
console.error(JSON.stringify({ status: false, error: err.message }, null, 2));
process.exit(1);
});
}