lib/parser/auditable.rb in arachni-0.2.4 vs lib/parser/auditable.rb in arachni-0.3

- old
+ new

@@ -47,10 +47,15 @@ def auditor( auditor ) @auditor = auditor end + def get_auditor + @auditor + end + + # # Delegate output related methods to the auditor # def debug? @@ -140,11 +145,11 @@ opts[:altered] = elem.altered.dup return if skip?( elem ) # inform the user about what we're auditing - print_status( get_status_str( opts[:altered] ) ) + print_status( get_status_str( opts[:altered] ) ) if !opts[:silent] # submit the element with the injection values req = elem.submit( opts ) return if !req @@ -177,11 +182,11 @@ hash = auditable( ).dup var_combo = [] if( !hash || hash.size == 0 ) then return [] end - if( self.is_a?( Arachni::Parser::Element::Form ) ) + if( self.is_a?( Arachni::Parser::Element::Form ) && !opts[:skip_orig] ) if !audited?( audit_id( Arachni::Parser::Element::Form::FORM_VALUES_ORIGINAL ) ) # this is the original hash, in case the default values # are valid and present us with new attack vectors elem = self.dup @@ -293,10 +298,10 @@ # make sure that we have a response before continuing if !res print_error( 'Failed to get responses, backing out... ' ) next else - print_status( 'Analyzing response #' + res.request.id.to_s + '...' ) + print_status( 'Analyzing response #' + res.request.id.to_s + '...' ) if elem.opts && !elem.opts[:silent] end # call the block, if there's one if block_given? block.call( res, elem.opts, elem )