From 89a79fa2a968318bf60fce0a6269e026983eef8e Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Tue, 10 Nov 2020 09:49:10 +1100 Subject: [PATCH] Add Zoey detection, fix excludes --- src/drivers/webextension/images/icons/Zoey.svg | 4 ++++ src/drivers/webextension/js/driver.js | 2 +- src/wappalyzer.js | 14 ++++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 src/drivers/webextension/images/icons/Zoey.svg diff --git a/src/drivers/webextension/images/icons/Zoey.svg b/src/drivers/webextension/images/icons/Zoey.svg new file mode 100644 index 000000000..0f04f6172 --- /dev/null +++ b/src/drivers/webextension/images/icons/Zoey.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index 72a845591..4552ed0e6 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -13,7 +13,7 @@ const { agent, promisify, getOption, setOption, open } = Utils const expiry = 1000 * 60 * 60 * 24 -const hostnameIgnoreList = /((local|dev(elop(ment)?)?|stag(e|ing)?|preprod|test(ing)?|demo(shop)?|admin|cache)[.-]|localhost|wappalyzer|google|facebook|twitter|reddit|yahoo|wikipedia|amazon|youtube|\/admin|\.local|\.test|\.dev|127\.|0\.)/ +const hostnameIgnoreList = /((local|dev(elop(ment)?)?|stag(e|ing)?|preprod|test(ing)?|demo(shop)?|admin|cache)[.-]|localhost|wappalyzer|google|facebook|twitter|reddit|yahoo|wikipedia|amazon|youtube|\/admin|\.local|\.test|\.dev|^[0-9.]$)/ const Driver = { lastPing: Date.now(), diff --git a/src/wappalyzer.js b/src/wappalyzer.js index e51b464ec..9f69ea21a 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -131,11 +131,17 @@ const Wappalyzer = { throw new Error(`Excluded technology does not exist: ${name}`) } - const index = resolved.findIndex(({ name }) => name === excluded.name) + let index - if (index !== -1) { - resolved.splice(index, 1) - } + do { + index = resolved.findIndex( + ({ technology: { name } }) => name === excluded.name + ) + + if (index !== -1) { + resolved.splice(index, 1) + } + } while (index !== -1) }) }) },