Files
ghaymah-dns-net-sec-tests/scripts/find_static_app_usage.js
T

17 lines
416 B
JavaScript

const fs = require('fs');
const content = fs.readFileSync('D:/cumin/ghaymah_dns_net_sec_tests/ghaymah_bundle.js', 'utf8');
const matches = [];
let p = 0;
while (true) {
const i = content.indexOf('createStaticApp', p);
if (i === -1) break;
matches.push(i);
p = i + 1;
}
for (const m of matches) {
console.log('--- snippet at', m, '---');
console.log(content.substring(Math.max(0, m - 100), m + 400));
}