module Arachni::UI::Output

RPC Output interface.

Basically provides us with {#print_error error logging} and the ability to reroute all other messages to a logfile.

@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>

Provides a blackhole output interface which is loaded when Arachni is not driven by a UI but being scripted.

@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>

Public Class Methods

reset_output_options() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 32
def self.reset_output_options
end

Public Instance Methods

debug(*)
Alias for: debug_on
debug?(*) click to toggle source
# File lib/arachni/ui/foo/output.rb, line 108
def debug?(*)
end
debug_level_1?() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 75
def debug_level_1?
    debug? 1
end
debug_level_2?() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 78
def debug_level_2?
    debug? 2
end
debug_level_3?() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 81
def debug_level_3?
    debug? 3
end
debug_level_4?() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 84
def debug_level_4?
    debug? 4
end
debug_off() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 105
def debug_off
end
debug_on(*) click to toggle source
# File lib/arachni/ui/foo/output.rb, line 101
def debug_on(*)
end
Also aliased as: debug
disable_only_positives() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 119
def disable_only_positives
end
included( base ) click to toggle source
# File lib/arachni/ui/foo/output.rb, line 18
def included( base )
    base.extend ClassMethods
end
mute() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 125
def mute
end
muted?() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 131
def muted?
end
only_positives() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 116
def only_positives
end
only_positives?() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 122
def only_positives?
end
print_bad( str = '' ) click to toggle source
print_debug( str = '', level = 1 ) click to toggle source
print_debug_backtrace(*) click to toggle source
print_debug_level_1( str = '' ) click to toggle source
print_debug_level_2( str = '' ) click to toggle source
print_debug_level_3( str = '' ) click to toggle source
print_debug_level_4(*) click to toggle source
print_error( str = '' ) click to toggle source
print_error_backtrace(*) click to toggle source
print_exception(*) click to toggle source
print_info( str = '' ) click to toggle source
print_line( str = '' ) click to toggle source
print_ok( str = '' ) click to toggle source
print_status( str = '' ) click to toggle source
print_verbose( str = '' ) click to toggle source
reroute_to_file( file ) click to toggle source
# File lib/arachni/rpc/server/output.rb, line 73
def reroute_to_file( file )
    @@reroute_to_file = file
end
reroute_to_file?() click to toggle source
# File lib/arachni/rpc/server/output.rb, line 77
def reroute_to_file?
    @@reroute_to_file
end
unmute() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 128
def unmute
end
verbose()
Alias for: verbose_on
verbose?() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 98
def verbose?
end
verbose_on() click to toggle source
# File lib/arachni/ui/foo/output.rb, line 94
def verbose_on
end
Also aliased as: verbose

Private Instance Methods

push_to_output_buffer( msg ) click to toggle source
# File lib/arachni/rpc/server/output.rb, line 83
def push_to_output_buffer( msg )
    return if !@@reroute_to_file

    File.open( @@reroute_to_file, 'a+' ) do |f|
        type = msg.keys[0]
        str  = msg.values[0]

        f.write( "[#{Time.now.asctime}] [#{type}]  #{str}\n" )
    end
end