Merge pull request #7 from AliasIO/master

Sync no.7
main
Daniel Zdziebko 7 years ago committed by GitHub
commit 1ca725da90

@ -7,8 +7,8 @@ after_success:
- sha256sum build/* > build/SHA256SUMS - sha256sum build/* > build/SHA256SUMS
- cat build/SHA256SUMS - cat build/SHA256SUMS
script: script: |-
- ./run build version=$(grep '"version":' src/drivers/webextension/manifest.json | sed 's/^.*"version": "\(.*\)".*$/\1/'); ./run build $version
deploy: deploy:
provider: releases provider: releases

@ -13,10 +13,9 @@ RUN apk update && apk add --no-cache \
optipng \ optipng \
zip zip
RUN mkdir -p /usr/share && \ # Fixes PhantomJS
cd /usr/share \ # https://github.com/dustinblackman/phantomized
&& curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xj \ RUN curl -Ls "https://github.com/dustinblackman/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz" | tar xz -C /
&& ln -s /usr/share/phantomjs/phantomjs /usr/bin/phantomjs
RUN apk del \ RUN apk del \
curl curl

@ -2,17 +2,31 @@
cd "$(dirname $0)/.." cd "$(dirname $0)/.."
version="$2"
if [[ -z "$version" ]]; then
current=$(grep '"version":' src/drivers/webextension/manifest.json | sed 's/^.*"version": "\(.*\)".*$/\1/')
echo "No version specified. Current version is $current."
exit 1;
fi
set -eu set -eu
./bin/validate ./bin/validate
echo "Deleting junk files..."
find . -name ".DS_Store" -exec rm {} \;
echo "Prettifying apps.json..." echo "Prettifying apps.json..."
jsonlint-cli -ist $'\t' src/apps.json jsonlint-cli -ist $'\t' src/apps.json
echo "Converting SVG icons to PNG..." echo "Converting SVG icons to PNG..."
#svg2png-many -i src/icons/ -o src/icons/converted/ --width=32 --height=32 svg2png-many -i src/icons/ -o src/icons/converted/ --width=32 --height=32
echo "Compressing PNG icons..." echo "Compressing PNG icons..."
@ -23,6 +37,9 @@ optipng -quiet "src/icons/converted/*.png"
set -e set -e
# NPM
sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" src/drivers/npm/package.json
# WebExtension # WebExtension
echo "Building WebExtension..." echo "Building WebExtension..."
@ -30,6 +47,8 @@ webextension_dir=src/drivers/webextension
pushd $webextension_dir > /dev/null pushd $webextension_dir > /dev/null
sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" manifest.json
zip -qr ../../../build/wappalyzer_webextension.zip . zip -qr ../../../build/wappalyzer_webextension.zip .
popd > /dev/null popd > /dev/null
@ -45,6 +64,8 @@ manifest_dir="Wappalyzer/edgeextension/manifest"
mv $webextension_dir/manifest.json $webextension_dir/manifest.webextension.json mv $webextension_dir/manifest.json $webextension_dir/manifest.webextension.json
mv $webextension_dir/manifest.edge.json $webextension_dir/manifest.json mv $webextension_dir/manifest.edge.json $webextension_dir/manifest.json
sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" $webextension_dir/manifest.json
manifoldjs -l debug -p edgeextension -f edgeextension -m $webextension_dir/manifest.json manifoldjs -l debug -p edgeextension -f edgeextension -m $webextension_dir/manifest.json
# Replace symlinks with actual files # Replace symlinks with actual files
@ -74,4 +95,4 @@ rm -rf Wappalyzer
popd > /dev/null popd > /dev/null
echo "Done." echo "Done (v$version)."

@ -2,8 +2,7 @@
"dependencies": { "dependencies": {
"file-type": "3.8.*", "file-type": "3.8.*",
"is-svg": "2.0.*", "is-svg": "2.0.*",
"read-chunk": "2.0.*", "read-chunk": "2.0.*"
"svg2png-many": "*"
} }
} }

@ -5238,7 +5238,7 @@
"cats": [ "cats": [
"12" "12"
], ],
"icon": "Moment.js.png", "icon": "Moment.js.svg",
"implies": "Moment.js", "implies": "Moment.js",
"script": "moment-timezone(?:\\-data)?(?:\\.min)?\\.js", "script": "moment-timezone(?:\\-data)?(?:\\.min)?\\.js",
"website": "http://momentjs.com/timezone/" "website": "http://momentjs.com/timezone/"
@ -5248,7 +5248,7 @@
"12" "12"
], ],
"env": "^moment$", "env": "^moment$",
"icon": "Moment.js.png", "icon": "Moment.js.svg",
"script": "moment(?:\\.min)?\\.js", "script": "moment(?:\\.min)?\\.js",
"website": "http://momentjs.com" "website": "http://momentjs.com"
}, },

@ -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.1.1", "version": "5.1.2",
"author": "Elbert Alias", "author": "Elbert Alias",
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": { "repository": {

@ -1,19 +1,19 @@
/** global: browser */ /** global: browser */
if ( document.body !== undefined ) { if ( typeof browser !== 'undefined' && typeof document.body !== 'undefined' ) {
var html = document.documentElement.outerHTML; var html = document.documentElement.outerHTML;
if ( html.length > 50000 ) { if ( html.length > 50000 ) {
html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length); html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length);
} }
browser.runtime.sendMessage({
id: 'analyze',
subject: { html },
source: 'content.js'
});
try { try {
browser.runtime.sendMessage({
id: 'analyze',
subject: { html },
source: 'content.js'
});
var container = document.createElement('wappalyzerData'); var container = document.createElement('wappalyzerData');
container.setAttribute('id', 'wappalyzerData'); container.setAttribute('id', 'wappalyzerData');
@ -42,7 +42,7 @@ if ( document.body !== undefined ) {
document.documentElement.appendChild(container); document.documentElement.appendChild(container);
document.documentElement.appendChild(script); document.documentElement.appendChild(script);
} catch(e) { } catch(e) {
log('Error: ' + e); log(e);
} }
} }

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

@ -4,7 +4,7 @@
"author": "Elbert Alias", "author": "Elbert Alias",
"homepage_url": "https://wappalyzer.com/", "homepage_url": "https://wappalyzer.com/",
"description": "Identify web technologies", "description": "Identify web technologies",
"version": "5.1.1", "version": "5.1.2",
"default_locale": "en", "default_locale": "en",
"manifest_version": 2, "manifest_version": 2,
"icons": { "icons": {
@ -43,7 +43,7 @@
}, },
{ {
"matches": [ "matches": [
"http://*/*", "http://*/*",
"https://*/*" "https://*/*"
], ],
"js": [ "js": [

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

@ -0,0 +1 @@
<svg width="2500" height="2500" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><g fill-rule="evenodd"><path d="M128 256c70.692 0 128-57.308 128-128C256 57.308 198.692 0 128 0 57.308 0 0 57.308 0 128c0 70.692 57.308 128 128 128zm0-19.2c-60.089 0-108.8-48.711-108.8-108.8S67.911 19.2 128 19.2 236.8 67.911 236.8 128 188.089 236.8 128 236.8z" fill="#376660"/><path d="M128 230.4c56.554 0 102.4-45.846 102.4-102.4 0-56.554-45.846-102.4-102.4-102.4C71.446 25.6 25.6 71.446 25.6 128c0 56.554 45.846 102.4 102.4 102.4zM128 32c-3.535 0-6.4 2.88-6.4 6.444V121.6H76.781A6.375 6.375 0 0 0 70.4 128c0 3.535 2.916 6.4 6.37 6.4h57.63V38.406A6.387 6.387 0 0 0 128 32z" fill="#529990"/></g></svg>

After

Width:  |  Height:  |  Size: 721 B

@ -116,11 +116,7 @@ class Wappalyzer {
this.driver.getRobotsTxt(parsed.host, parsed.protocol === 'https:') this.driver.getRobotsTxt(parsed.host, parsed.protocol === 'https:')
.then(robotsTxt => { .then(robotsTxt => {
robotsTxt.forEach(disallow => { robotsTxt.forEach(disallow => parsed.pathname.indexOf(disallow) === 0 && reject());
if ( parsed.pathname.indexOf(disallow) === 0 ) {
reject();
}
});
resolve(); resolve();
}); });
@ -352,7 +348,7 @@ class Wappalyzer {
this.hostnameCache[hostname].applications[appName].version = app.version; this.hostnameCache[hostname].applications[appName].version = app.version;
} }
}) })
.catch(() => console.log('Disallowed in robots.txt: ' + url)) .catch(() => this.log('Disallowed in robots.txt: ' + url), 'core')
} }
} }
}); });