lib/arachni/browser/javascript/scripts/dom_monitor.js in arachni-1.0.6 vs lib/arachni/browser/javascript/scripts/dom_monitor.js in arachni-1.1

- old
+ new

@@ -1,7 +1,7 @@ /* - * Copyright 2010-2014 Tasos Laskos <tasos.laskos@arachni-scanner.com> + * Copyright 2010-2015 Tasos Laskos <tasos.laskos@arachni-scanner.com> * * This file is part of the Arachni Framework project and is subject to * redistribution and commercial restrictions. Please see the Arachni Framework * web site for more information on licensing and terms of use. */ @@ -20,11 +20,13 @@ timeouts: [], // Keeps track of setInterval() calls. intervals: [], - exclude_from_digest: ['P'], + exclude_tags_from_digest: ['P'], + + exclude_attributes_from_digest: ['data-arachni-id'], // Initialize. initialize: function () { if( _tokenDOMMonitor.initialized ) return; @@ -75,18 +77,21 @@ var digest = ''; for( var i = 0; i < length; i++ ) { var element = elements[i]; - if( _tokenDOMMonitor.exclude_from_digest.indexOf( element.tagName ) > -1 ) + if( _tokenDOMMonitor.exclude_tags_from_digest.indexOf( element.tagName ) > -1 ) continue; digest += '<' + element.tagName; var attributes = element.attributes; var attr_length = attributes.length; for( var j = 0; j < attr_length; j++ ){ + if( _tokenDOMMonitor.exclude_attributes_from_digest.indexOf( attributes[j].nodeName ) > -1 ) + continue; + digest += ' ' + attributes[j].nodeName + '=' + attributes[j].nodeValue; } digest += '>' }