/** * ======================================================== * Name: Lewati - Universal Shortlink Bypass & Resolver Engine * * Cara Download: * curl -sL "https://code.vamxapi.my.id/snippet/raw/lewati-bypass" -o lewati-bypass.js * * Cara Eksekusi: * node lewati-bypass.js "https://s.id/test" * node lewati-bypass.js "https://cutt.ly/demo" * * Author: Vamz Spectre * Source: https://vamxapi.my.id * ======================================================== */ const axios = require("axios"); /** * Bypass shortened link via Lewati Engine * @param {string} targetUrl - Shortened URL to bypass * @returns {Promise} */ async function bypassUrl(targetUrl) { if (!targetUrl || typeof targetUrl !== "string") { throw new Error("Parameter URL target wajib diisi string yang valid!"); } const cleanUrl = targetUrl.trim(); const formData = new URLSearchParams(); formData.append("url", cleanUrl); try { const response = await axios.post("https://lewati.web.id/process.php", formData.toString(), { headers: { "Content-Type": "application/x-www-form-urlencoded", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "Origin": "https://lewati.web.id", "Referer": "https://lewati.web.id/" }, timeout: 15000 }); const resData = response.data; if (!resData || typeof resData !== "object") { throw new Error("Respon dari server lewati tidak valid"); } if (!resData.success) { return { status: false, creator: "Vamz Spectre", message: resData.message || "Gagal melakukan bypass tautan.", errorCode: resData.errorCode || "BYPASS_FAILED", shortUrl: cleanUrl }; } const payload = resData.data || {}; return { status: true, creator: "Vamz Spectre", message: resData.message || "Berhasil membuka tautan!", data: { shortUrl: payload.shortUrl || cleanUrl, realUrl: payload.realUrl || null, domain: payload.domain || null, redirectType: payload.redirectType || null, strategyUsed: payload.strategyUsed || null, executionTime: resData.executionTime || null, screenshot: payload.screenshot || null, searchLinks: payload.searchLinks || {}, safetyLinks: payload.safetyLinks || {} } }; } catch (error) { return { status: false, creator: "Vamz Spectre", message: error.response?.data?.message || error.message || "Terjadi kesalahan jaringan/server." }; } } async function lewati(url) { return await bypassUrl(url); } module.exports = { lewati, bypassUrl }; async function runCli() { const cliArg = process.argv[2]; if (!cliArg) { console.error( JSON.stringify( { status: false, creator: "Vamz Spectre", message: "Gunakan perintah: node lewati-bypass.js \"\"", example: "node lewati-bypass.js \"https://s.id/test\"" }, null, 2 ) ); process.exit(1); } const res = await lewati(cliArg); console.log(JSON.stringify(res, null, 2)); } if (require.main === module || process.argv[1]?.includes("lewati-bypass.js")) { runCli().catch((err) => { console.error(JSON.stringify({ status: false, error: err.message }, null, 2)); process.exit(1); }); }