mozilla / blurts-server

Mozilla Monitor arms you with tools to keep your personal information safe. Find out what hackers already know about you and learn how to stay a step ahead of them.
https://monitor.mozilla.org
Mozilla Public License 2.0
731 stars 206 forks source link

Emuparadise breach logo is missing #1100

Closed pdehaan closed 5 years ago

pdehaan commented 5 years ago

https://monitor.firefox.com/breach-details/Emuparadise

Firefox_Monitor
/*
$ 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();
pdehaan commented 5 years ago

https://haveibeenpwned.com/api/v2/breach/Emuparadise

"LogoPath": "https://haveibeenpwned.com/Content/Images/PwnedLogos/Emuparadise.png"