Fix linting issues

main
Elbert Alias 7 years ago
parent acd2fcb3f2
commit cbca9c3e7a

@ -174,7 +174,7 @@
video_assets: opt_video_assets,
assets: opt_assets,
version: '3',
mrev: '4aeaa5a-c',
mrev: 'fe20291-c',
msgNum: this.msgNum,
timestamp: new Date().getTime(),
pageVis: document.visibilityState,
@ -859,7 +859,7 @@
let _pageTags;
const INIT_MS_BW_SEARCHES = 2000;
const PAGE_TAG_RE = new RegExp('gpt|oascentral');
const POST_MSG_ID = '1519242200-10756-12873-1462-13403';
const POST_MSG_ID = '1532387537-31575-24732-11173-32339';
const AD_SERVER_RE = new RegExp('^(google_ads_iframe|oas_frame|atwAdFrame)');
function getPageTags(doc) {

File diff suppressed because it is too large Load Diff

@ -291,12 +291,12 @@ class Wappalyzer {
let userAgent;
robotsTxt.split('\n').forEach((line) => {
let matches = /^User-agent:\s*(.+)$/i.exec(line);
let matches = /^User-agent:\s*(.+)$/i.exec(line.trim());
if (matches) {
userAgent = matches[1].toLowerCase();
} else if (userAgent === '*' || userAgent === 'wappalyzer') {
matches = /^Disallow:\s*(.+)$/i.exec(line);
matches = /^Disallow:\s*(.+)$/i.exec(line.trim());
if (matches) {
disallow.push(matches[1]);
@ -394,39 +394,41 @@ class Wappalyzer {
resolveImplies(apps, url) {
let checkImplies = true;
// Implied applications
// Run several passes as implied apps may imply other apps
while (checkImplies) {
checkImplies = false;
Object.keys(apps).forEach((appName) => {
const app = apps[appName];
const resolve = (appName) => {
const app = apps[appName];
if (app && app.props.implies) {
asArray(app.props.implies).forEach((implied) => {
[implied] = this.parsePatterns(implied);
if (app && app.props.implies) {
asArray(app.props.implies).forEach((implied) => {
[implied] = this.parsePatterns(implied);
if (!this.apps[implied.string]) {
this.log(`Implied application ${implied.string} does not exist`, 'core', 'warn');
if (!this.apps[implied.string]) {
this.log(`Implied application ${implied.string} does not exist`, 'core', 'warn');
return;
}
return;
}
if (!(implied.string in apps)) {
apps[implied.string] = this.detected[url] && this.detected[url][implied.string]
? this.detected[url][implied.string]
: new Application(implied.string, this.apps[implied.string], true);
if (!(implied.string in apps)) {
apps[implied.string] = this.detected[url] && this.detected[url][implied.string]
? this.detected[url][implied.string]
: new Application(implied.string, this.apps[implied.string], true);
checkImplies = true;
}
checkImplies = true;
}
// Apply app confidence to implied app
Object.keys(app.confidence).forEach((id) => {
apps[implied.string].confidence[`${id} implied by ${appName}`] = app.confidence[id] * (implied.confidence === undefined ? 1 : implied.confidence / 100);
});
// Apply app confidence to implied app
Object.keys(app.confidence).forEach((id) => {
apps[implied.string].confidence[`${id} implied by ${appName}`] = app.confidence[id] * (implied.confidence === undefined ? 1 : implied.confidence / 100);
});
}
});
});
}
};
// Implied applications
// Run several passes as implied apps may imply other apps
while (checkImplies) {
checkImplies = false;
Object.keys(apps).forEach(resolve);
}
}