Files

34 lines
1.4 KiB
JavaScript

// Extract API URLs and DNS/networking patterns from Ghaymah JS bundle
async function main() {
const r = await fetch('https://deploy.ghaymah.systems/assets/index-BtAOb0IJ.js', { signal: AbortSignal.timeout(15000) });
const js = await r.text();
console.log('JS Bundle size:', js.length, 'bytes');
// Extract API base URLs
const apiMatches = js.match(/https?:\/\/[a-zA-Z0-9.-]+\.(systems|dev|com|io)[\/a-zA-Z0-9._-]*/g) || [];
console.log('\nAPI URLs found in bundle:');
[...new Set(apiMatches)].forEach(u => console.log(' ', u));
// Look for DNS/mesh/network related strings
const dnsPatterns = ['dns', 'mesh', 'internal', 'private', 'network', 'constellation', 'tag', 'alias', 'resolve'];
console.log('\nDNS/Network related string contexts:');
for (const pat of dnsPatterns) {
const regex = new RegExp('.{0,50}' + pat + '.{0,50}', 'gi');
const matches = js.match(regex) || [];
if (matches.length > 0) {
console.log(' [' + pat + '] (' + matches.length + ' matches):');
matches.slice(0, 5).forEach(m => console.log(' ...' + m.trim() + '...'));
}
}
// Look for route path patterns
const routePattern = /path:\s*"([^"]+)"/g;
const routes = [];
let m;
while ((m = routePattern.exec(js)) !== null) {
routes.push(m[1]);
}
console.log('\nRoutes found:', [...new Set(routes)]);
}
main().catch(console.error);