/** * Omar-Thing TikTok Profile & Region Inspector * Author: Vamz Spectre (VamxAPI) * Target: https://omar-thing.site * * Download & Run: * curl -sL "https://code.vamxapi.my.id/snippet/raw/omar-thing-tiktok" -o omar-thing-tiktok.js * node omar-thing-tiktok.js "tiktok" * * Features: * - Auto Bypass Payload Sealing & Worker Gateway * - Proprietary Bitwise Stream Decryption Engine * - Extracts Full TikTok Profile Info, Verification, Seller Status & Room Live ID * - Real-time Follower, Following, Likes (Hearts), Video Counts & Locked Region Code * - Pure Node.js 18+ (Zero External Dependencies) */ /** * Decrypt proprietary hex payload from Omar-Thing worker * @param {string} hexPayload * @param {number} hint * @returns {object} */ function decryptResponse(hexPayload, hint) { const matches = hexPayload.match(/.{2}/g); if (!matches) throw new Error('Format payload terenkripsi tidak valid'); const encrypted = new Uint8Array(matches.map(h => parseInt(h, 16))); const seed = hint; const decrypted = new Uint8Array(encrypted.length); for (let i = 0; i < encrypted.length; i++) { let b = encrypted[i]; if (i > 0) b = b ^ (encrypted[i - 1] & 0x3f); b = ((b >> 3) | (b << 5)) & 0xff; b = b ^ ((255 - (i % 256)) & 0xff); b = ((b - 17 + 256) * 43) & 0xff; b = b ^ ((seed >> (i % 8)) & 0xff); decrypted[i] = b; } const fullStr = new TextDecoder().decode(decrypted); const MAGIC = '\x02\x1F\x03'; const idx = fullStr.indexOf(MAGIC); if (idx === -1) throw new Error('Respon worker gagal didekripsi (Magic header mismatch)'); return JSON.parse(fullStr.substring(idx + MAGIC.length)); } /** * Request helper with fallback endpoints * @param {string[]} urls * @param {object} options * @returns {Promise} */ async function fetchWithFallback(urls, options = {}) { let lastError = null; for (const url of urls) { try { const res = await fetch(url, options); if (res.ok) return res; if (res.status >= 500 || res.status === 429) continue; return res; } catch (err) { lastError = err; } } throw lastError || new Error('Semua endpoint gateway gagal dihubungi'); } /** * Scrape TikTok user profile & region details via Omar-Thing worker * @param {string} inputUsername * @returns {Promise} */ async function omarThingTikTok(inputUsername) { const username = String(inputUsername || '').trim().replace(/^@/, ''); if (!username) { throw new Error('Username TikTok wajib diisi'); } const sealRes = await fetchWithFallback( [ 'https://dev.omar-thing.site/api/v1/seal', 'https://for.omar-thing.site/api/seal' ], { method: 'POST', headers: { 'Content-Type': 'application/json', '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://omar-thing.site', 'Referer': 'https://omar-thing.site/' }, body: JSON.stringify({ username }) } ); if (!sealRes.ok) { throw new Error(`Inisialisasi seal gagal: HTTP ${sealRes.status}`); } const sealData = await sealRes.json(); if (!sealData || !sealData.s) { throw new Error('Gagal mendapatkan token seal enkripsi dari server'); } const workerRes = await fetchWithFallback( [ 'https://worker.omar-thing.site/', 'https://for.omar-thing.site/test' ], { method: 'POST', headers: { 'Content-Type': 'application/json', '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://omar-thing.site', 'Referer': 'https://omar-thing.site/' }, body: JSON.stringify({ sealed: sealData.s, seal_id: sealData.id }) } ); if (!workerRes.ok) { const errText = await workerRes.text().catch(() => ''); throw new Error(`Worker error HTTP ${workerRes.status}: ${errText || 'User tidak ditemukan'}`); } const responseJson = await workerRes.json(); let data; if (responseJson.p && responseJson.h !== undefined) { data = decryptResponse(responseJson.p, responseJson.h); } else { data = responseJson; } if (!data || data.error || !data.nickname) { throw new Error(data?.error || `Akun TikTok @${username} tidak ditemukan atau private`); } return { status: true, author: 'Vamz Spectre', result: { username: data.username || username, nickname: data.nickname || '', userId: data.userId || '', secUid: data.secUid || '', region: data.userRegionCode || data.region || 'Unknown', language: data.language || '', bio: data.about || '', bioLink: data.bioLink || '', avatar: data.avatar || '', isVerified: data.isVerified === 'Yes' || data.isVerified === true, isPrivate: data.isPrivate === 'Yes' || data.privateAccount === true, isLive: data.isLive === 'Yes' || data.isLive === true, roomId: data.roomId || '', accountCreated: data.accountCreated || '', stats: { followers: Number(data.stats?.followers || 0), following: Number(data.stats?.following || 0), hearts: Number(data.stats?.hearts || 0), videos: Number(data.stats?.videos || 0), friends: Number(data.stats?.friends || 0) } } }; } // CLI Execution Support if (require.main === module) { const arg = process.argv[2]; if (!arg) { console.log( JSON.stringify( { status: false, error: 'Parameter username TikTok belum diisi.', usage: 'node omar-thing-tiktok.js ""', example: 'node omar-thing-tiktok.js "tiktok"' }, null, 2 ) ); process.exit(1); } omarThingTikTok(arg) .then(result => { console.log(JSON.stringify(result, null, 2)); process.exit(0); }) .catch(err => { console.error( JSON.stringify( { status: false, error: err.message || String(err) }, null, 2 ) ); process.exit(1); }); } module.exports = omarThingTikTok;