forked from HTTPArchive/wappalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
216 additions
and
3,200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM alpine | ||
|
||
MAINTAINER Elbert Alias <[email protected]> | ||
|
||
ENV WAPPALYZER_DIR=/opt/wappalyzer | ||
|
||
RUN apk add --no-cache \ | ||
bash \ | ||
curl \ | ||
fontconfig \ | ||
nodejs \ | ||
optipng \ | ||
zip | ||
|
||
RUN mkdir -p /usr/share && \ | ||
cd /usr/share \ | ||
&& curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xj \ | ||
&& ln -s /usr/share/phantomjs/phantomjs /usr/bin/phantomjs | ||
|
||
RUN apk del \ | ||
curl | ||
|
||
RUN npm i -g \ | ||
jsonlint-cli \ | ||
manifoldjs \ | ||
svg2png-many | ||
|
||
RUN mkdir -p $WAPPALYZER_DIR | ||
|
||
WORKDIR $WAPPALYZER_DIR | ||
|
||
CMD [ "./bin/run" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
cd "$(dirname $0)/../src" | ||
|
||
echo "Creating links..." | ||
|
||
ln -nsf ../../apps.json drivers/npm | ||
ln -nsf ../../wappalyzer.js drivers/npm | ||
|
||
ln -nsf ../../apps.json drivers/webextension | ||
ln -nsf ../../../wappalyzer.js drivers/webextension/js | ||
ln -nsf ../../../icons/ drivers/webextension/images/icons | ||
|
||
echo "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
cd "$(dirname $0)" | ||
|
||
if [[ -f "$1" ]]; then | ||
./$1 $@ | ||
else | ||
./help | ||
|
||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
cd "$(dirname $0)/.." | ||
|
||
set -eu | ||
|
||
echo "Validating apps.json..." | ||
|
||
jsonlint-cli -s schema.json src/apps.json | ||
|
||
echo "Validating regular expressions..." | ||
|
||
./bin/validate-regex | ||
|
||
echo "Validating icons..." | ||
|
||
./bin/validate-icons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env node | ||
|
||
var | ||
app, | ||
fs = require('fs'), | ||
fileType = require('../node_modules/file-type'), | ||
readChunk = require('../node_modules/read-chunk') | ||
isSvg = require('../node_modules/is-svg') | ||
json = require('../src/apps.json'); | ||
|
||
for (app in json.apps) { | ||
(function(app) { | ||
var | ||
basePath = 'src/icons/'; | ||
iconPath = json.apps[app].icon || 'default.svg'; | ||
path = basePath + iconPath, | ||
ext = iconPath.substr(iconPath.length - 4); | ||
|
||
if ( ext !== '.png' && ext !== '.svg' ) { | ||
throw err = new Error('Icon file extension specified for app "' + app + '" is not ".png" or ".svg": src/icons/' + iconPath); | ||
} | ||
|
||
fs.exists(path, function(exists) { | ||
if ( exists ) { | ||
if ( ext === '.png' ) { | ||
var buffer = fileType(readChunk.sync(path, 0, 262)); | ||
|
||
if ( buffer === null ) { | ||
throw new Error('Unknown mimetype or bad file for "' + app + '": src/icons/' + iconPath); | ||
} else if ( buffer.mime !== 'image/png' ) { | ||
throw new Error('Incorrect mimetype "' + buffer.mime + '" when expected PNG for app "' + app + '": src/icons/' + iconPath); | ||
} | ||
} else if ( type === 'svg' ) { | ||
if ( !isSvg(fs.readFileSync(path)) ) { | ||
throw new Error('Incorrect mimetype when expected SVG for app "' + app + '": src/icons/' + iconPath); | ||
} | ||
} | ||
} else { | ||
throw Error('Missing file for app "' + app + '": src/icons/' + iconPath); | ||
} | ||
}); | ||
}(app)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.