/** * AM Jzcloud Activator - Alight Motion Magic Link Activation & Token Resolver * Author: Vamz Spectre (VamxAPI) * Target: https://am.jzcloud.web.id * * Download & Run: * curl -sL "https://code.vamxapi.my.id/snippet/raw/am-jzcloud-activator" -o am-jzcloud-activator.js * node am-jzcloud-activator.js "stats" * node am-jzcloud-activator.js "user@example.com" * node am-jzcloud-activator.js "verify:user@example.com:https://alightcreative.com/login?oobCode=xxxx" * * Features: * - Live Activation Statistics (Total & Today count) * - Auto Request Magic Link without password to email * - Verify Magic Link & Extract Account UID, Order ID, and Firebase ID Token * - Pure Node.js 18+ (Zero External Dependencies) */ const BASE_URL = 'https://am.jzcloud.web.id'; /** * Fetch activation stats * @returns {Promise} */ async function getStats() { const res = await fetch(`${BASE_URL}/api/stats`, { headers: { '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', 'Accept': 'application/json' } }); if (!res.ok) { throw new Error(`Gagal mengambil statistik: HTTP ${res.status}`); } const data = await res.json(); return { status: true, action: 'stats', data }; } /** * Send Alight Motion login / activation magic link to email * @param {string} email * @returns {Promise} */ async function sendLink(email) { if (!email || !email.includes('@')) { throw new Error('Alamat email tidak valid'); } const res = await fetch(`${BASE_URL}/api/send-link`, { 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', 'Referer': `${BASE_URL}/` }, body: JSON.stringify({ email: email.trim() }) }); const data = await res.json().catch(() => ({})); if (!res.ok || data.success === false) { throw new Error(data.message || `Gagal mengirim link: HTTP ${res.status}`); } return { status: true, action: 'send_link', message: data.message || 'Link aktivasi berhasil dikirim ke email.', email: data.email || email.trim() }; } /** * Verify received magic link from email and extract premium token / UID * @param {string} email * @param {string} magicLink * @returns {Promise} */ async function verifyLink(email, magicLink) { if (!email || !email.includes('@')) { throw new Error('Alamat email tidak valid'); } if (!magicLink) { throw new Error('Link verifikasi atau oobCode wajib diisi'); } const res = await fetch(`${BASE_URL}/api/verify-link`, { 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', 'Referer': `${BASE_URL}/` }, body: JSON.stringify({ email: email.trim(), magicLink: magicLink.trim() }) }); const data = await res.json().catch(() => ({})); if (!res.ok || data.success === false) { throw new Error(data.message || `Verifikasi gagal: HTTP ${res.status}`); } return { status: true, action: 'verify_link', data: data.data || data }; } /** * Main wrapper * @param {string} input * @returns {Promise} */ async function amJzcloudActivator(input) { const str = String(input || '').trim(); if (!str || str.toLowerCase() === 'stats') { return await getStats(); } if (str.startsWith('verify:')) { const parts = str.slice(7).split(':'); const email = parts[0]; const magicLink = parts.slice(1).join(':'); return await verifyLink(email, magicLink); } if (str.startsWith('send:')) { const email = str.slice(5); return await sendLink(email); } if (str.includes('@')) { return await sendLink(str); } return await getStats(); } // CLI Execution Support if (require.main === module) { const arg = process.argv[2]; if (!arg) { console.log( JSON.stringify( { status: false, error: 'Parameter belum diisi.', usage: 'node am-jzcloud-activator.js ""', examples: [ 'node am-jzcloud-activator.js "stats"', 'node am-jzcloud-activator.js "user@example.com"', 'node am-jzcloud-activator.js "verify:user@example.com:https://..."' ] }, null, 2 ) ); process.exit(1); } amJzcloudActivator(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 = { amJzcloudActivator, getStats, sendLink, verifyLink };