22 lines
708 B
JavaScript
22 lines
708 B
JavaScript
const fs = require('fs');
|
|
const content = fs.readFileSync('D:/cumin/ghaymah_dns_net_sec_tests/ghaymah_bundle.js', 'utf8');
|
|
|
|
// Find ALL gateway endpoints
|
|
const regex = /jb\s*\(\s*["'`]([^"'`]+)["'`]/g;
|
|
const endpoints = new Set();
|
|
let m;
|
|
while ((m = regex.exec(content)) !== null) {
|
|
endpoints.add(m[1]);
|
|
}
|
|
console.log('Gateway API endpoints:');
|
|
[...endpoints].forEach(e => console.log(' ', e));
|
|
|
|
// Find all integrations endpoints
|
|
const regex2 = /integrations\.ghaymah\.systems\/api([^"'`\s,)]+)/g;
|
|
const intEndpoints = new Set();
|
|
while ((m = regex2.exec(content)) !== null) {
|
|
intEndpoints.add(m[1]);
|
|
}
|
|
console.log('\nIntegrations API endpoints:');
|
|
[...intEndpoints].forEach(e => console.log(' ', e));
|