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
711 stars 203 forks source link

Add breach logo for Zhenai.com breach #1121

Closed pdehaan closed 5 years ago

pdehaan commented 5 years ago

Missing a logo at https://fx-breach-alerts.herokuapp.com/breach-details/Zhenai

Firefox_Monitor

https://haveibeenpwned.com/api/v2/breach/Zhenai has the following logo: https://haveibeenpwned.com/Content/Images/PwnedLogos/Zhenai.png

Zhenai_png__110×48_
pdehaan commented 5 years ago

Ah, looks like HIBP has been busy! Also looks like they added a few more breaches recently that we'll need logos for:

pdehaan commented 5 years ago

2 more recently:

ACCOUNTS NAME
140,029 BlackSpigotMC
39,086,762 SHEIN
pdehaan commented 5 years ago

And a bunch more added to HIBP in last couple days.

Here's a semi-accurate list of missing breach logos:

[
  { url: 'https://monitor.firefox.com/img/logos/Animoto.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/ArmorGames.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/Artvalue.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/BlackSpigotMC.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/BulgarianNationalRevenueAgency.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/EatStreet.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/Evite.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/GameSalad.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/MindJolt.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/Netlog.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/piZap.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/Roll20.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/SHEIN.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/StrongholdKingdoms.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/Xiaomi.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/YouNow.png', err: 404 },
  { url: 'https://monitor.firefox.com/img/logos/Zhenai.png', err: 404 }
]
Source: ```js const axios = require("axios"); const check = require("check-broken-links"); main(); async function main(baseUrl = "https://monitor.firefox.com/img/logos") { const breaches = await getBreaches(50); const logos = breaches.map(breach => `${baseUrl}/${breach.LogoPath}`); const broken = await check(baseUrl, logos); console.log(sortByString(broken.top, "url")); } async function getBreaches(limit = 50) { const res = await axios.get("https://monitor.firefox.com/hibp/breaches"); const sortedBreaches = sortByDate(res.data, "AddedDate"); if (limit) { return sortedBreaches.slice(0, limit); } return sortedBreaches; } function sortByString(arr, key = "url") { return arr.sort((resultA, resultB) => { const valueA = resultA[key].toLowerCase(); const valueB = resultB[key].toLowerCase(); if (valueA > valueB) { return 1; } if (valueA < valueB) { return -1; } return 0; }); } function sortByDate(arr, key = "AddedDate") { return arr.sort((breachA, breachB) => { const dateA = new Date(breachA[key]); const dateB = new Date(breachB[key]); if (dateA > dateB) { return -1; } if (dateA < dateB) { return 1; } return 0; }); } ```
pdehaan commented 5 years ago

Fixed. Closing