Sha256: 9ac46786650aaf4147a61b27a2090f7fc9070e1b67703a9b2aa55d3ce43275c7

Contents?: true

Size: 1.67 KB

Versions: 8

Compression:

Stored size: 1.67 KB

Contents

=begin
    Copyright 2010-2013 Tasos Laskos <tasos.laskos@gmail.com>

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
=end

#
# Creates a plain text report of the audit.
#
# It redirects stdout to an outfile and runs the default (stdout.rb) report.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
#
# @version 0.2.1
#
class Arachni::Reports::Text < Arachni::Report::Base

    def run
        load Arachni::Options.dir['reports'] + 'stdout.rb'

        print_line
        print_status "Dumping audit results in #{outfile}."

        # redirect output streams to the outfile
        stdout  = $stdout.dup
        stderr  = $stderr.dup
        $stderr = $stdout = File.new( outfile, 'w' )

        Reports::Stdout.new( auditstore, options ).run

        $stdout.close
        $stdout = stdout.dup
        $stderr = stderr.dup

        print_status 'Done!'
    end

    def self.info
        {
            name:        'Text',
            description: %q{Exports the audit results as a text (.txt) file.},
            author:      'Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>',
            version:     '0.2.1',
            options:     [ Options.outfile( '.txt' ) ]
        }
    end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
arachni-0.4.5.2 reports/txt.rb
arachni-0.4.5.1 reports/txt.rb
arachni-0.4.5 reports/txt.rb
arachni-0.4.4 reports/txt.rb
arachni-0.4.3.2 reports/txt.rb
arachni-0.4.3.1 reports/txt.rb
arachni-0.4.3 reports/txt.rb
arachni-0.4.2 reports/txt.rb