const https = require('https');
const ROUTES = [
'/',
'/agents',
'/apps',
'/devices',
'/dns',
'/dpi-analytics',
'/encryption-audit',
'/events',
'/flows',
'/geography',
'/intelligence',
'/lookup',
'/network-infrastructure',
'/network-intelligence',
'/network-topology',
'/security-audit',
'/threat-intelligence',
'/threats',
'/traffic-categories',
'/help',
'/login'
];
function auditRoute(route) {
return new Promise((resolve) => {
https.get(`https://demoplace.my.id${route}`, (res) => {
let data = '';
res.on('data', c => data += c);
res.on('end', () => {
const title = (data.match(/
(.*?)<\/title>/i) || [])[1] || 'N/A';
const desc = (data.match(/]*>(.*?)<\/h[123]>/gi);
for (const m of hMatches) {
const clean = m[1].replace(/<[^>]+>/g, '').trim();
if (clean && !headers.includes(clean)) headers.push(clean);
}
resolve({
route,
status: res.statusCode,
is404: data.includes('404: This page could not be found'),
title,
desc,
icons,
imgs,
headers
});
});
}).on('error', err => resolve({ route, error: err.message }));
});
}
async function main() {
console.log('=== DETAILED AUDIT OF DEMOPLACE.MY.ID ===\n');
for (const r of ROUTES) {
const res = await auditRoute(r);
if (res.is404) {
console.log(`❌ [404 NOT FOUND] ${res.route}`);
} else {
console.log(`✅ [200 OK] ${res.route}`);
console.log(` Title : ${res.title}`);
console.log(` Icons : ${res.icons.join(', ')}`);
console.log(` Images/Logo: ${res.imgs.join(', ')}`);
console.log(` Headers : ${res.headers.join(' | ')}`);
}
console.log('--------------------------------------------------');
}
}
main();