LOADING
#!/usr/bin/env node
/**
* VIU Premium Account Wrapper (viu.interflazz.my.id)
* Node.js ESM — output JSON pretty print
*
* Usage:
* node viu.js
* node viu.js --device-id=abc123
* DEVICE_ID=abc123 node viu.js
*/
import { createHash, randomBytes } from 'node:crypto';
import { parseArgs } from 'node:util';
const BASE_URL = 'https://viu.interflazz.my.id/?action=account';
const DEFAULT_HEADERS = {
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
Accept: 'application/json',
'Content-Type': 'application/json',
Origin: 'https://viu.interflazz.my.id',
Referer: 'https://viu.interflazz.my.id/',
};
/**
* Generate device_id mirip fingerprint browser (32 hex chars)
*/
function generateDeviceId(seed = null) {
if (seed) {
return createHash('md5').update(String(seed)).digest('hex');
}
return randomBytes(16).toString('hex');
}
/**
* Ambil akun VIU berdasarkan device_id
* @param {string} deviceId
* @returns {Promise<object>}
*/
export async function getViuAccount(deviceId) {
const res = await fetch(BASE_URL, {
method: 'POST',
headers: DEFAULT_HEADERS,
body: JSON.stringify({ device_id: deviceId }),
});
if (!res.ok) {
throw new Error(`HTTP ${res.status}: ${res.statusText}`);
}
const data = await res.json();
if (!data.success) {
throw new Error(data.message || 'Gagal mengambil akun');
}
return {
success: data.success,
message: data.message,
is_new: data.is_new,
device_id: data.device_id,
account: {
email: data.account?.email ?? null,
password: data.account?.password ?? null,
},
fetched_at: new Date().toISOString(),
};
}
// CLI
async function main() {
const { values } = parseArgs({
options: {
'device-id': { type: 'string', short: 'd' },
help: { type: 'boolean', short: 'h' },
},
allowPositionals: false,
});
if (values.help) {
console.log(`
Usage:
node viu.js
node viu.js --device-id <id>
node viu.js -d <id>
Env:
DEVICE_ID=... (prioritas lebih rendah dari --device-id)
`);
process.exit(0);
}
const deviceId =
values['device-id'] ||
process.env.DEVICE_ID ||
generateDeviceId();
try {
const result = await getViuAccount(deviceId);
console.log(JSON.stringify(result, null, 2));
} catch (err) {
console.error(
JSON.stringify(
{
success: false,
error: err.message,
device_id: deviceId,
},
null,
2
)
);
process.exit(1);
}
}
// Jalankan hanya jika file ini dieksekusi langsung
const isMain =
process.argv[1] &&
(import.meta.url.endsWith(process.argv[1].replace(/\\/g, '/')) ||
process.argv[1].endsWith('viu.js'));
if (isMain) {
main();
}Node.js ESM wrapper untuk mengambil akun VIU Premium dari viu.interflazz.my.id.
Output berupa JSON pretty-print berisi email & password akun yang terikat ke device_id.
device_id otomatis atau pakai yang fixedfetch)Cukup download file viu.js, tidak perlu npm install.
bash# Opsional: buat executable chmod +x viu.js
bash# Generate device_id baru (bisa dapat akun berbeda) node viu.js # Pakai device_id tetap (akun akan sama selama device_id sama) node viu.js --device-id=7bbcdb4555269c9ef31d2b05eb4cc020 node viu.js -d 7bbcdb4555269c9ef31d2b05eb4cc020 # Lewat environment variable DEVICE_ID=myfingerprint123 node viu.js # Bantuan node viu.js --help
json{ "success": true, "message": "Akun perangkat berhasil ditemukan.", "is_new": false, "device_id": "7bbcdb4555269c9ef31d2b05eb4cc020", "account": { "email": "viupremium9v@interflazz.my.id", "password": "masuk123" }, "fetched_at": "2026-10-19T00:00:00.000Z" }
Jika gagal:
json{ "success": false, "error": "HTTP 500: Internal Server Error", "device_id": "abc123..." }
jsimport { getViuAccount } from './viu.js'; const result = await getViuAccount('my-device-id-here'); console.log(result.account.email, result.account.password);
https://viu.interflazz.my.id/?action=account{ "device_id": "..." }device_id tersebutdevice_id = satu akun (sistem fingerprint browser)device_id baru jika ingin mencoba akun berbedaMIT — bebas dipakai & dimodifikasi.