Closed pdehaan closed 5 years ago
https://monitor.firefox.com/breach-details/Emuparadise
/* $ node lint-logos > [404] https://fx-breach-alerts.herokuapp.com/img/logos/Emuparadise.png is dead */ const checkLinks = require("check-links"); const got = require("got"); const imgLogo = "https://fx-breach-alerts.herokuapp.com/img/logos"; async function checkLogos() { const res = await got.get("https://haveibeenpwned.com/api/v2/breaches", {json: true}); const breaches = []; for (const breach of res.body) { const [logoPath] = /[^/]*$/.exec(breach.LogoPath); breach.LogoPath = [imgLogo, logoPath].join("/"); breaches.push(breach.LogoPath); } const results = await checkLinks(breaches); for (const [url, res] of Object.entries(results)) { if (res.status !== "alive") { console.log(`[${res.statusCode}] ${url} is ${res.status}`); process.exitCode = 1; } } process.exit(); } checkLogos();
https://haveibeenpwned.com/api/v2/breach/Emuparadise
"LogoPath": "https://haveibeenpwned.com/Content/Images/PwnedLogos/Emuparadise.png"
https://monitor.firefox.com/breach-details/Emuparadise