Set upper HTML length limit in Chrome driver

main
Elbert Alias 12 years ago
parent 18641fc87b
commit 17dc933d0d

@ -299,6 +299,8 @@ var wappalyzer = (function() {
break;
}
w.log('xxxxxxxxxxxxx'+data.html.length);
parse(w.apps[app][type]).map(function(pattern) {
profiler.checkPoint(app, type, pattern.regex);

@ -1,9 +1,15 @@
(function() {
var c = {
init: function() {
var html = document.documentElement.outerHTML;
c.log('init');
chrome.extension.sendRequest({ id: 'analyze', subject: { html: document.documentElement.outerHTML } });
if ( html.length > 50000 ) {
html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length);
}
chrome.extension.sendRequest({ id: 'analyze', subject: { html: html } });
c.getEnvironmentVars();
},
@ -13,6 +19,8 @@
},
getEnvironmentVars: function() {
var container, script;
c.log('getEnvironmentVars');
if ( typeof document.documentElement.innerHTML === 'undefined' ) {
@ -20,12 +28,12 @@
}
try {
var container = document.createElement('wappalyzerData');
container = document.createElement('wappalyzerData');
container.setAttribute('id', 'wappalyzerData');
container.setAttribute('style', 'display: none');
var script = document.createElement('script');
script = document.createElement('script');
script.setAttribute('id', 'wappalyzerEnvDetection');
script.setAttribute('src', chrome.extension.getURL('js/inject.js'));

@ -299,6 +299,8 @@ var wappalyzer = (function() {
break;
}
w.log('xxxxxxxxxxxxx'+data.html.length);
parse(w.apps[app][type]).map(function(pattern) {
profiler.checkPoint(app, type, pattern.regex);

@ -1,7 +1,7 @@
{ "name": "Wappalyzer",
"homepage_url": "http://wappalyzer.com?utm_source=chrome&utm_medium=context&utm_campaign=extensions",
"description": "Identifies software on the web",
"version": "2.23",
"version": "2.24",
"default_locale": "en",
"manifest_version": 2,
"icons": {

@ -299,6 +299,8 @@ var wappalyzer = (function() {
break;
}
w.log('xxxxxxxxxxxxx'+data.html.length);
parse(w.apps[app][type]).map(function(pattern) {
profiler.checkPoint(app, type, pattern.regex);

@ -299,6 +299,8 @@ var wappalyzer = (function() {
break;
}
w.log('xxxxxxxxxxxxx'+data.html.length);
parse(w.apps[app][type]).map(function(pattern) {
profiler.checkPoint(app, type, pattern.regex);

@ -299,6 +299,8 @@ var wappalyzer = (function() {
break;
}
w.log('xxxxxxxxxxxxx'+data.html.length);
parse(w.apps[app][type]).map(function(pattern) {
profiler.checkPoint(app, type, pattern.regex);

@ -299,6 +299,8 @@ var wappalyzer = (function() {
break;
}
w.log('xxxxxxxxxxxxx'+data.html.length);
parse(w.apps[app][type]).map(function(pattern) {
profiler.checkPoint(app, type, pattern.regex);

@ -299,6 +299,8 @@ var wappalyzer = (function() {
break;
}
w.log('xxxxxxxxxxxxx'+data.html.length);
parse(w.apps[app][type]).map(function(pattern) {
profiler.checkPoint(app, type, pattern.regex);