Build 5.6.1

main
Elbert Alias 6 years ago
parent ecb9f80f63
commit c728d7f066

@ -27,9 +27,9 @@ node index.js [url] [options]
### Options ### Options
``` ```
--password Password to be used for basic HTTP authentication --password Password to be used for basic HTTP authentication
--proxy Proxy URL, e.g. 'http://user:pass@proxy:8080' --proxy Proxy URL, e.g. 'http://user:pass@proxy:8080'
--username Username to be used for basic HTTP authentication --username Username to be used for basic HTTP authentication
--chunk-size=num Process links in chunks. --chunk-size=num Process links in chunks.
--debug=0|1 Output debug messages. --debug=0|1 Output debug messages.
--delay=ms Wait for ms milliseconds between requests. --delay=ms Wait for ms milliseconds between requests.

@ -2,7 +2,7 @@
"name": "wappalyzer", "name": "wappalyzer",
"description": "Uncovers the technologies used on websites", "description": "Uncovers the technologies used on websites",
"homepage": "https://github.com/AliasIO/Wappalyzer", "homepage": "https://github.com/AliasIO/Wappalyzer",
"version": "5.6.0", "version": "5.6.1",
"author": "Elbert Alias", "author": "Elbert Alias",
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": { "repository": {
@ -12,6 +12,7 @@
"main": "driver.js", "main": "driver.js",
"files": [ "files": [
"apps.json", "apps.json",
"browsers/zombie.js",
"index.js", "index.js",
"driver.js", "driver.js",
"wappalyzer.js" "wappalyzer.js"

@ -24,20 +24,22 @@ browser.tabs.onRemoved.addListener((tabId) => {
* Get a value from localStorage * Get a value from localStorage
*/ */
function getOption(name, defaultValue = null) { function getOption(name, defaultValue = null) {
return new Promise(async (resolve) => { return new Promise(async (resolve, reject) => {
let value = defaultValue; let value = defaultValue;
try { try {
const option = await browser.storage.local.get(name); const option = await browser.storage.local.get(name);
if (option[name]) { if (option[name] !== undefined) {
value = option[name]; value = option[name];
} }
} catch (error) { } catch (error) {
wappalyzer.log(error, 'driver', 'error'); wappalyzer.log(error.message, 'driver', 'error');
return reject(error.message);
} }
resolve(value); return resolve(value);
}); });
} }
@ -45,14 +47,16 @@ function getOption(name, defaultValue = null) {
* Set a value in localStorage * Set a value in localStorage
*/ */
function setOption(name, value) { function setOption(name, value) {
return new Promise(async (resolve) => { return new Promise(async (resolve, reject) => {
try { try {
await browser.storage.local.set({ [name]: value }); await browser.storage.local.set({ [name]: value });
} catch (error) { } catch (error) {
wappalyzer.log(error, 'driver', 'error'); wappalyzer.log(error.message, 'driver', 'error');
return reject(error.message);
} }
resolve(); return resolve();
}); });
} }
@ -334,10 +338,10 @@ wappalyzer.driver.ping = async (hostnameCache = {}, adCache = []) => {
url: `${wappalyzer.config.websiteURL}installed`, url: `${wappalyzer.config.websiteURL}installed`,
}); });
} else if (version !== previousVersion && upgradeMessage) { } else if (version !== previousVersion && upgradeMessage) {
//openTab({ openTab({
// url: `${wappalyzer.config.websiteURL}upgraded?v${version}`, url: `${wappalyzer.config.websiteURL}upgraded?v${version}`,
// background: true, background: true,
//}); });
} }
await setOption('version', version); await setOption('version', version);

@ -1,26 +1,51 @@
/** global: browser */ /** global: browser */
/** global: Wappalyzer */ /** global: Wappalyzer */
/* globals browser chrome Wappalyzer */ /* globals browser Wappalyzer */
/* eslint-env browser */ /* eslint-env browser */
const wappalyzer = new Wappalyzer(); const wappalyzer = new Wappalyzer();
function getOption(name, defaultValue, callback) { /**
browser.storage.local.get(name) * Get a value from localStorage
.then((item) => { */
callback(item.hasOwnProperty(name) ? item[name] : defaultValue); function getOption(name, defaultValue = null) {
}); return new Promise(async (resolve, reject) => {
let value = defaultValue;
try {
const option = await browser.storage.local.get(name);
if (option[name] !== undefined) {
value = option[name];
}
} catch (error) {
wappalyzer.log(error.message, 'driver', 'error');
return reject(error.message);
}
return resolve(value);
});
} }
/**
* Set a value in localStorage
*/
function setOption(name, value) { function setOption(name, value) {
(chrome || browser).runtime.sendMessage({ return new Promise(async (resolve, reject) => {
id: 'set_option', try {
key: name, await browser.storage.local.set({ [name]: value });
value, } catch (error) {
wappalyzer.log(error.message, 'driver', 'error');
return reject(error.message);
}
return resolve();
}); });
} }
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', async () => {
const nodes = document.querySelectorAll('[data-i18n]'); const nodes = document.querySelectorAll('[data-i18n]');
Array.prototype.forEach.call(nodes, (node) => { Array.prototype.forEach.call(nodes, (node) => {
@ -39,33 +64,33 @@ document.addEventListener('DOMContentLoaded', () => {
window.open(wappalyzer.config.websiteURL); window.open(wappalyzer.config.websiteURL);
}); });
getOption('upgradeMessage', true, (value) => { let el;
const el = document.querySelector('#option-upgrade-message'); let value;
el.checked = value; // Upgrade message
value = await getOption('upgradeMessage', true);
el.addEventListener('change', () => { el = document.querySelector('#option-upgrade-message');
setOption('upgradeMessage', el.checked);
});
});
getOption('dynamicIcon', true, (value) => { el.checked = value;
const el = document.querySelector('#option-dynamic-icon');
el.checked = value; el.addEventListener('change', e => setOption('upgradeMessage', e.target.checked));
el.addEventListener('change', () => { // Dynamic icon
setOption('dynamicIcon', el.checked); value = await getOption('dynamicIcon', true);
});
});
getOption('tracking', true, (value) => { el = document.querySelector('#option-dynamic-icon');
const el = document.querySelector('#option-tracking');
el.checked = value; el.checked = value;
el.addEventListener('change', () => { el.addEventListener('change', e => setOption('dynamicIcon', e.target.checked));
setOption('tracking', el.checked);
}); // Tracking
}); value = await getOption('tracking', true);
el = document.querySelector('#option-tracking');
el.checked = value;
el.addEventListener('change', e => setOption('tracking', e.target.checked));
}); });

@ -4,7 +4,7 @@
"author": "Elbert Alias", "author": "Elbert Alias",
"homepage_url": "https://www.wappalyzer.com", "homepage_url": "https://www.wappalyzer.com",
"description": "Identify web technologies", "description": "Identify web technologies",
"version": "5.6.0", "version": "5.6.1",
"default_locale": "en", "default_locale": "en",
"manifest_version": 2, "manifest_version": 2,
"icons": { "icons": {