diff --git a/lib/rex/arch.rb b/lib/rex/arch.rb index 5863f8ae78..53db55b72b 100644 --- a/lib/rex/arch.rb +++ b/lib/rex/arch.rb @@ -2,7 +2,6 @@ require 'rex/constants' module Rex - ### # # This module provides generalized methods for performing operations that are @@ -15,8 +14,8 @@ module Arch # # Architecture classes # - require 'rex/arch/x86' - require 'rex/arch/sparc' + autoload :X86, 'rex/arch/x86' + autoload :Sparc, 'rex/arch/sparc' # # This routine adjusts the stack pointer for a given architecture. diff --git a/lib/rex/encoder.rb b/lib/rex/encoder.rb new file mode 100644 index 0000000000..536d382c0d --- /dev/null +++ b/lib/rex/encoder.rb @@ -0,0 +1,17 @@ +## +# $Id$ +# +# This file maps encoders for autoload +## + +module Rex::Encoder + # Encoder support code + autoload :Xor, 'rex/encoder/xor' + autoload :Alpha2, 'rex/encoder/alpha2' + autoload :NonAlpha, 'rex/encoder/nonalpha' + autoload :NonUpper, 'rex/encoder/nonupper' + + # Hrm? Is these in the wrong module? + autoload :XDR, 'rex/encoder/xdr' + autoload :NDR, 'rex/encoder/ndr' +end diff --git a/lib/rex/encoder/alpha2.rb b/lib/rex/encoder/alpha2.rb index b3983f62b7..f1b013844d 100644 --- a/lib/rex/encoder/alpha2.rb +++ b/lib/rex/encoder/alpha2.rb @@ -18,14 +18,16 @@ module Rex module Encoder module Alpha2 -end end end -# -# include the Alpha2 encodings -# + # + # autoload the Alpha2 encoders + # + autoload :Generic, 'rex/encoder/alpha2/generic' + autoload :AlphaMixed, 'rex/encoder/alpha2/alpha_mixed' + autoload :AlphaUpper, 'rex/encoder/alpha2/alpha_upper' + autoload :UnicodeMixed, 'rex/encoder/alpha2/unicode_mixed' + autoload :UnicodeUpper, 'rex/encoder/alpha2/unicode_upper' -require 'rex/encoder/alpha2/generic' -require 'rex/encoder/alpha2/alpha_mixed' -require 'rex/encoder/alpha2/alpha_upper' -require 'rex/encoder/alpha2/unicode_mixed' -require 'rex/encoder/alpha2/unicode_upper' \ No newline at end of file +end +end +end diff --git a/lib/rex/encoder/xor.rb b/lib/rex/encoder/xor.rb index 5474e92465..599a712aa4 100644 --- a/lib/rex/encoder/xor.rb +++ b/lib/rex/encoder/xor.rb @@ -10,6 +10,9 @@ module Encoder ### class Xor + autoload :Dword, 'rex/encoder/xor/dword' + autoload :DwordAdditive, 'rex/encoder/xor/dword_additive' + attr_accessor :raw, :encoded, :badchars, :opts, :key, :fkey # :nodoc: # @@ -65,5 +68,5 @@ class Xor end -end end - +end +end diff --git a/lib/rex/encoders.rb b/lib/rex/encoders.rb new file mode 100644 index 0000000000..5a4ed855c1 --- /dev/null +++ b/lib/rex/encoders.rb @@ -0,0 +1,11 @@ +## +# $Id$ +# +# This file maps encoders for autoload +## +require 'rex' + +module Rex::Encoders + autoload :XorDword, 'rex/encoders/xor_dword' + autoload :XorDwordAdditive, 'rex/encoders/xor_dword_additive' +end diff --git a/lib/rex/encoding.rb b/lib/rex/encoding.rb new file mode 100644 index 0000000000..60a8c24302 --- /dev/null +++ b/lib/rex/encoding.rb @@ -0,0 +1,10 @@ +## +# $Id$ +# +# This file maps encodings for autoload +## + +module Rex::Encoding + # Encoding support code + autoload :Xor, 'rex/encoding/xor' +end diff --git a/lib/rex/encoding/xor.rb b/lib/rex/encoding/xor.rb index 1c0e3c3e7c..513d1f8546 100644 --- a/lib/rex/encoding/xor.rb +++ b/lib/rex/encoding/xor.rb @@ -1,20 +1,19 @@ -#!/usr/bin/env ruby - -# -# make sure the namespace is created -# - module Rex module Encoding module Xor -end end end -# -# include the Xor encodings -# + # + # autoload the Xor encodings + # + autoload :Generic, 'rex/encoding/xor/generic' + autoload :Byte, 'rex/encoding/xor/byte' + autoload :Word, 'rex/encoding/xor/word' + autoload :Dword, 'rex/encoding/xor/dword' + autoload :DwordAdditive, 'rex/encoding/xor/dword_additive' + autoload :Qword, 'rex/encoding/xor/qword' -require 'rex/encoding/xor/generic' -require 'rex/encoding/xor/byte' -require 'rex/encoding/xor/word' -require 'rex/encoding/xor/dword' -require 'rex/encoding/xor/qword' \ No newline at end of file + autoload :Exception, 'rex/encoding/xor/exceptions' + +end +end +end diff --git a/lib/rex/io.rb b/lib/rex/io.rb new file mode 100644 index 0000000000..1390ad3d9e --- /dev/null +++ b/lib/rex/io.rb @@ -0,0 +1,16 @@ +## +# $Id$ +# +# This file simply provides an autoload interface for the children +# of Rex::IO +# +## +module Rex::IO + autoload :Stream, 'rex/io/stream' + autoload :StreamAbstraction, 'rex/io/stream_abstraction' + autoload :StreamServer, 'rex/io/stream_server' + + autoload :BidirectionalPipe, 'rex/io/bidirectional_pipe' + autoload :DatagramAbstraction, 'rex/io/datagram_abstraction' + autoload :RingBuffer, 'rex/io/ring_buffer' +end diff --git a/lib/rex/logging.rb b/lib/rex/logging.rb index f8743e55f8..d002cc2c95 100644 --- a/lib/rex/logging.rb +++ b/lib/rex/logging.rb @@ -1,4 +1,17 @@ -#!/usr/bin/env ruby +## +# $Id: $ +# +# maps autoload for logging classes +## require 'rex/constants' # for LEV_'s -require 'rex/logging/log_dispatcher' \ No newline at end of file + +module Rex +module Logging + autoload :LogSink, 'rex/logging/log_sink' + autoload :Sinks, 'rex/logging/sinks' +end +end + +# This defines a global so it must be loaded always +require 'rex/logging/log_dispatcher' diff --git a/lib/rex/logging/log_dispatcher.rb b/lib/rex/logging/log_dispatcher.rb index 81e21a541a..b9a7698b9d 100644 --- a/lib/rex/logging/log_dispatcher.rb +++ b/lib/rex/logging/log_dispatcher.rb @@ -1,5 +1,4 @@ require 'rex/sync' -require 'rex/logging/log_sink' module Rex module Logging diff --git a/lib/rex/logging/log_sink.rb b/lib/rex/logging/log_sink.rb index 6726c3c01b..36f41bc294 100644 --- a/lib/rex/logging/log_sink.rb +++ b/lib/rex/logging/log_sink.rb @@ -37,6 +37,3 @@ end end end - -require 'rex/logging/sinks/flatfile' -require 'rex/logging/sinks/stderr' \ No newline at end of file diff --git a/lib/rex/logging/sinks.rb b/lib/rex/logging/sinks.rb new file mode 100644 index 0000000000..d83fa4bc01 --- /dev/null +++ b/lib/rex/logging/sinks.rb @@ -0,0 +1,16 @@ +## +# $Id$ +# +# Map log sinks for autload +## + +module Rex +module Logging +module Sinks + + autoload :Flatfile, 'rex/logging/sinks/flatfile' + autoload :Stderr, 'rex/logging/sinks/stderr' + +end +end +end diff --git a/lib/rex/logging/sinks/flatfile.rb b/lib/rex/logging/sinks/flatfile.rb index bbe5248a95..0a1386072b 100644 --- a/lib/rex/logging/sinks/flatfile.rb +++ b/lib/rex/logging/sinks/flatfile.rb @@ -1,3 +1,5 @@ +require 'rex/logging' + module Rex module Logging module Sinks diff --git a/lib/rex/parser.rb b/lib/rex/parser.rb new file mode 100644 index 0000000000..895ce029e8 --- /dev/null +++ b/lib/rex/parser.rb @@ -0,0 +1,23 @@ +## +# $Id$ +# +# This file maps parsers for autoload +## + +module Rex +module Parser + # General parsers + autoload :Arguments, 'rex/parser/arguments' + autoload :Ini, 'rex/parser/ini' + + # Data import parsers + autoload :NmapXMLStreamParser, 'rex/parser/nmap_xml' + autoload :NexposeXMLStreamParser, 'rex/parser/nexpose_xml' + autoload :RetinaXMLStreamParser, 'rex/parser/retina_xml' + autoload :NetSparkerXMLStreamParser, 'rex/parser/netsparker_xml' + autoload :NessusXMLStreamParser, 'rex/parser/nessus_xml' + autoload :IP360XMLStreamParser, 'rex/parser/ip360_xml' + autoload :IP360ASPLXMLStreamParser, 'rex/parser/ip360_aspl_xml' + autoload :AppleBackupManifestDB, 'rex/parser/apple_backup_manifestdb' +end +end diff --git a/lib/rex/payloads.rb b/lib/rex/payloads.rb index 812e37951c..a9490ec8e1 100644 --- a/lib/rex/payloads.rb +++ b/lib/rex/payloads.rb @@ -1 +1,3 @@ -require 'rex/payloads/win32' \ No newline at end of file +module Rex::Payloads + autoload :Win32, 'rex/payloads/win32' +end diff --git a/lib/rex/payloads/win32.rb b/lib/rex/payloads/win32.rb index 1ad36583b2..f149e5f8e5 100644 --- a/lib/rex/payloads/win32.rb +++ b/lib/rex/payloads/win32.rb @@ -1,2 +1,4 @@ -require 'rex/payloads/win32/common' -require 'rex/payloads/win32/kernel' \ No newline at end of file +module Rex::Payloads::Win32 + autoload :Common, 'rex/payloads/win32/common' + autoload :Kernel, 'rex/payloads/win32/kernel' +end diff --git a/lib/rex/payloads/win32/kernel.rb b/lib/rex/payloads/win32/kernel.rb index 92f961cc37..defc87a9a5 100644 --- a/lib/rex/payloads/win32/kernel.rb +++ b/lib/rex/payloads/win32/kernel.rb @@ -1,14 +1,13 @@ module Rex module Payloads module Win32 - -require 'rex/payloads/win32/kernel/common' -require 'rex/payloads/win32/kernel/recovery' -require 'rex/payloads/win32/kernel/stager' -require 'rex/payloads/win32/kernel/migration' - module Kernel + autoload :Common, 'rex/payloads/win32/kernel/common' + autoload :Recovery, 'rex/payloads/win32/kernel/recovery' + autoload :Stager, 'rex/payloads/win32/kernel/stager' + autoload :Migration, 'rex/payloads/win32/kernel/migration' + # # Constructs a kernel-mode payload using the supplied options. The options # can be: diff --git a/lib/rex/peparsey.rb b/lib/rex/peparsey.rb index 1a58ff8f99..71664f76e8 100644 --- a/lib/rex/peparsey.rb +++ b/lib/rex/peparsey.rb @@ -1,12 +1,11 @@ #!/usr/bin/env ruby - +# # $Id$ +# module Rex module PeParsey - + autoload :Pe, 'rex/peparsey/pe' + autoload :PeMemDump, 'rex/peparsey/pe_memdump' end end - -require 'rex/peparsey/pe' -require 'rex/peparsey/pe_memdump' \ No newline at end of file diff --git a/lib/rex/pescan.rb b/lib/rex/pescan.rb index e143cbb6a6..cdc625f2f9 100644 --- a/lib/rex/pescan.rb +++ b/lib/rex/pescan.rb @@ -1,13 +1,12 @@ #!/usr/bin/env ruby - +# # $Id$ +# module Rex module PeScan - + autoload :Analyze, 'rex/pescan/analyze' + autoload :Scanner, 'rex/pescan/scanner' + autoload :Search, 'rex/pescan/search' end end - -require 'rex/pescan/analyze' -require 'rex/pescan/scanner' -require 'rex/pescan/search' \ No newline at end of file diff --git a/lib/rex/platforms.rb b/lib/rex/platforms.rb index 1da07e02cd..4c068be50a 100644 --- a/lib/rex/platforms.rb +++ b/lib/rex/platforms.rb @@ -1 +1,11 @@ -require 'rex/platforms/windows' \ No newline at end of file +## +# $Id: $ +# +# This file maps Platforms for autoload +## + +module Rex +module Platforms + autoload :Windows, 'rex/platforms/windows' +end +end diff --git a/lib/rex/proto.rb b/lib/rex/proto.rb index c5f1b773d1..3b60b91edb 100644 --- a/lib/rex/proto.rb +++ b/lib/rex/proto.rb @@ -1,13 +1,24 @@ -require 'rex/proto/http' -require 'rex/proto/smb' -require 'rex/proto/ntlm' -require 'rex/proto/dcerpc' -require 'rex/proto/drda' +## +# $Id$ +# +# This file maps Proto items for autoload +## module Rex module Proto -attr_accessor :alias + autoload :Http, 'rex/proto/http' + autoload :SMB, 'rex/proto/smb' + autoload :NTLM, 'rex/proto/ntlm' + autoload :DCERPC, 'rex/proto/dcerpc' + autoload :DRDA, 'rex/proto/drda' + + autoload :SunRPC, 'rex/proto/sunrpc' + autoload :DHCP, 'rex/proto/dhcp' + autoload :TFTP, 'rex/proto/tftp' + autoload :RFB, 'rex/proto/rfb' + + attr_accessor :alias end end diff --git a/lib/rex/proto/dcerpc.rb b/lib/rex/proto/dcerpc.rb index 2c9f38759b..d477558f3e 100644 --- a/lib/rex/proto/dcerpc.rb +++ b/lib/rex/proto/dcerpc.rb @@ -1,6 +1,15 @@ -require 'rex/proto/dcerpc/uuid' -require 'rex/proto/dcerpc/response' -require 'rex/proto/dcerpc/client' -require 'rex/proto/dcerpc/packet' -require 'rex/proto/dcerpc/handle' -require 'rex/proto/dcerpc/ndr' \ No newline at end of file +module Rex +module Proto +module DCERPC + + autoload :Exceptions, 'rex/proto/dcerpc/exceptions' + autoload :UUID, 'rex/proto/dcerpc/uuid' + autoload :Response, 'rex/proto/dcerpc/response' + autoload :Client, 'rex/proto/dcerpc/client' + autoload :Packet, 'rex/proto/dcerpc/packet' + autoload :Handle, 'rex/proto/dcerpc/handle' + autoload :NDR, 'rex/proto/dcerpc/ndr' + +end +end +end diff --git a/lib/rex/proto/drda.rb b/lib/rex/proto/drda.rb index 1e66b787aa..9950ca43b7 100644 --- a/lib/rex/proto/drda.rb +++ b/lib/rex/proto/drda.rb @@ -1,5 +1,10 @@ -require 'rex/proto/drda/constants' +module Rex +module Proto +module DRDA + autoload :Constants, 'rex/proto/drda/constants' + autoload :Utils, 'rex/proto/drda/utils' +end +end +end + require 'rex/proto/drda/packet' -require 'rex/proto/drda/utils' - - diff --git a/lib/rex/proto/http.rb b/lib/rex/proto/http.rb index 470c4b176a..41ffe63f98 100644 --- a/lib/rex/proto/http.rb +++ b/lib/rex/proto/http.rb @@ -1,5 +1,18 @@ +# These are required by all uses of Rex::Proto::Http require 'rex/proto/http/packet' require 'rex/proto/http/request' require 'rex/proto/http/response' -require 'rex/proto/http/client' -require 'rex/proto/http/server' \ No newline at end of file + +# These are specific to use case +module Rex +module Proto +module Http + + autoload :Client, 'rex/proto/http/client' + + autoload :Server, 'rex/proto/http/server' + autoload :Handler, 'rex/proto/http/handler' + +end +end +end diff --git a/lib/rex/proto/http/packet.rb b/lib/rex/proto/http/packet.rb index 5030f3779c..a031edb2c5 100644 --- a/lib/rex/proto/http/packet.rb +++ b/lib/rex/proto/http/packet.rb @@ -1,4 +1,5 @@ require 'rex/proto/http' +require 'rex/text' module Rex module Proto diff --git a/lib/rex/proto/ntlm.rb b/lib/rex/proto/ntlm.rb index ff416f3733..0c6c204f5e 100644 --- a/lib/rex/proto/ntlm.rb +++ b/lib/rex/proto/ntlm.rb @@ -1,7 +1,13 @@ -require 'rex/proto/ntlm/constants' -require 'rex/proto/ntlm/exceptions' -require 'rex/proto/ntlm/crypt' -require 'rex/proto/ntlm/utils' -require 'rex/proto/ntlm/base' -require 'rex/proto/ntlm/message' +module Rex +module Proto +module NTLM + autoload :Constants, 'rex/proto/ntlm/constants' + autoload :Exceptions, 'rex/proto/ntlm/exceptions' + autoload :Base, 'rex/proto/ntlm/base' + autoload :Crypt, 'rex/proto/ntlm/crypt' + autoload :Message, 'rex/proto/ntlm/message' + autoload :Utils, 'rex/proto/ntlm/utils' +end +end +end diff --git a/lib/rex/proto/ntlm/message.rb b/lib/rex/proto/ntlm/message.rb index a00d85cbd6..03ec7f5329 100644 --- a/lib/rex/proto/ntlm/message.rb +++ b/lib/rex/proto/ntlm/message.rb @@ -45,6 +45,8 @@ #this module defines the message class , useful for easily handling type 1/2/3 ntlm messages +require 'rex/text' + require 'rex/proto/ntlm/base' require 'rex/proto/ntlm/constants' require 'rex/proto/ntlm/crypt' diff --git a/lib/rex/proto/smb.rb b/lib/rex/proto/smb.rb index 2787024d56..7786ae1756 100644 --- a/lib/rex/proto/smb.rb +++ b/lib/rex/proto/smb.rb @@ -1,7 +1,15 @@ -require 'rex/proto/smb/constants' -require 'rex/proto/smb/exceptions' -require 'rex/proto/smb/evasions' -require 'rex/proto/smb/crypt' -require 'rex/proto/smb/utils' -require 'rex/proto/smb/client' -require 'rex/proto/smb/simpleclient' \ No newline at end of file +module Rex +module Proto +module SMB + + autoload :Constants, 'rex/proto/smb/constants' + autoload :Exceptions, 'rex/proto/smb/exceptions' + autoload :Evasions, 'rex/proto/smb/evasions' + autoload :Crypt, 'rex/proto/smb/crypt' + autoload :Utils, 'rex/proto/smb/utils' + autoload :Client, 'rex/proto/smb/client' + autoload :SimpleClient, 'rex/proto/smb/simpleclient' + +end +end +end diff --git a/lib/rex/service_manager.rb b/lib/rex/service_manager.rb index 8beabd655c..8cfc7d35ab 100644 --- a/lib/rex/service_manager.rb +++ b/lib/rex/service_manager.rb @@ -1,6 +1,5 @@ require 'singleton' require 'rex' -require 'rex/service' module Rex diff --git a/lib/rex/socket.rb b/lib/rex/socket.rb index 8bbc976f88..e3f46b2c0a 100644 --- a/lib/rex/socket.rb +++ b/lib/rex/socket.rb @@ -12,19 +12,23 @@ module Rex ### module Socket - module Comm - end + # Plumbing / Aux + autoload :Parameters, 'rex/socket/parameters' + autoload :Comm, 'rex/socket/comm' - require 'rex/socket/parameters' - require 'rex/socket/tcp' - require 'rex/socket/tcp_server' + # Underlying protocol-specific + autoload :Ip, 'rex/socket/ip' + autoload :Udp, 'rex/socket/udp' + autoload :Tcp, 'rex/socket/tcp' + autoload :TcpServer, 'rex/socket/tcp_server' + autoload :SslTcp, 'rex/socket/ssl_tcp' + autoload :SslTcpServer, 'rex/socket/ssl_tcp_server' - require 'rex/socket/comm' - require 'rex/socket/comm/local' - - require 'rex/socket/switch_board' - require 'rex/socket/subnet_walker' - require 'rex/socket/range_walker' + # Utilities + autoload :SwitchBoard, 'rex/socket/switch_board' + autoload :SubnetWalker, 'rex/socket/subnet_walker' + autoload :Range, 'rex/socket/range_walker' + autoload :RangeWalker, 'rex/socket/range_walker' ## # diff --git a/lib/rex/socket/comm.rb b/lib/rex/socket/comm.rb index efc86c7f5c..4510e329d0 100644 --- a/lib/rex/socket/comm.rb +++ b/lib/rex/socket/comm.rb @@ -14,6 +14,8 @@ module Socket ### module Comm + autoload :Local, 'rex/socket/comm/local' + ### # # This mixin provides stubs for event notification handlers that can be diff --git a/lib/rex/socket/comm/local.rb b/lib/rex/socket/comm/local.rb index f1481c1337..f9cb3f93c9 100644 --- a/lib/rex/socket/comm/local.rb +++ b/lib/rex/socket/comm/local.rb @@ -1,10 +1,6 @@ -require 'singleton' +require 'rex/compat' require 'rex/socket' -require 'rex/socket/tcp' -require 'rex/socket/ssl_tcp' -require 'rex/socket/ssl_tcp_server' -require 'rex/socket/udp' -require 'rex/socket/ip' +require 'singleton' require 'timeout' ### diff --git a/lib/rex/sync.rb b/lib/rex/sync.rb index da212e9dc2..543777fb28 100644 --- a/lib/rex/sync.rb +++ b/lib/rex/sync.rb @@ -1,6 +1,6 @@ -#!/usr/bin/env ruby - -require 'rex/sync/thread_safe' -require 'rex/sync/ref' -require 'rex/sync/read_write_lock' -require 'rex/sync/event' \ No newline at end of file +module Rex + autoload :ReadWriteLock, 'rex/sync/read_write_lock' + autoload :ThreadSafe, 'rex/sync/thread_safe' + autoload :Ref, 'rex/sync/ref' + autoload :Sync, 'rex/sync/event' +end diff --git a/lib/rex/ui.rb b/lib/rex/ui.rb index ec1cb87091..d35680e299 100644 --- a/lib/rex/ui.rb +++ b/lib/rex/ui.rb @@ -3,19 +3,19 @@ # wrappers of the rex library. # -# General classes -require 'rex/ui/output' -require 'rex/ui/progress_tracker' +require 'rex' -# Text-based user interfaces -require 'rex/ui/text/input' -require 'rex/ui/text/shell' -require 'rex/ui/text/dispatcher_shell' -require 'rex/ui/text/irb_shell' +module Rex +module Ui + # General classes + autoload :Output, 'rex/ui/output' + autoload :ProgressTracker, 'rex/ui/progress_tracker' -require 'rex/ui/text/color' -require 'rex/ui/text/table' + # Text-based user interfaces + autoload :Text, 'rex/ui/text' -# Ui subscriber -require 'rex/ui/subscriber' -require 'rex/ui/interactive' \ No newline at end of file + # Ui subscriber + autoload :Subscriber, 'rex/ui/subscriber' + autoload :Interactive, 'rex/ui/interactive' +end +end diff --git a/lib/rex/ui/text.rb b/lib/rex/ui/text.rb new file mode 100644 index 0000000000..c44a682e0d --- /dev/null +++ b/lib/rex/ui/text.rb @@ -0,0 +1,17 @@ +module Rex +module Ui +module Text + autoload :Input, 'rex/ui/text/input' + autoload :Output, 'rex/ui/text/output' + autoload :Color, 'rex/ui/text/color' + autoload :Table, 'rex/ui/text/table' + + autoload :PseudoShell, 'rex/ui/text/shell' + autoload :Shell, 'rex/ui/text/shell' + autoload :DispatcherShell, 'rex/ui/text/dispatcher_shell' + autoload :IrbShell, 'rex/ui/text/irb_shell' + + autoload :ProgressTracker, 'rex/ui/text/progress_tracker' +end +end +end diff --git a/lib/rex/ui/text/input.rb b/lib/rex/ui/text/input.rb index cff4fb0a4e..8582114d81 100644 --- a/lib/rex/ui/text/input.rb +++ b/lib/rex/ui/text/input.rb @@ -13,10 +13,10 @@ module Text ### class Input - require 'rex/ui/text/input/stdio' - require 'rex/ui/text/input/readline' - require 'rex/ui/text/input/socket' - require 'rex/ui/text/color' + autoload :Buffer, 'rex/ui/text/color' + autoload :Stdio, 'rex/ui/text/input/stdio' + autoload :Readline, 'rex/ui/text/input/readline' + autoload :Socket, 'rex/ui/text/input/socket' include Rex::Ui::Text::Color diff --git a/lib/rex/ui/text/output.rb b/lib/rex/ui/text/output.rb index f81a265a93..65078e666b 100644 --- a/lib/rex/ui/text/output.rb +++ b/lib/rex/ui/text/output.rb @@ -12,11 +12,10 @@ module Text ### class Output < Rex::Ui::Output - require 'rex/ui/text/output/stdio' - require 'rex/ui/text/output/socket' - require 'rex/ui/text/output/buffer' - require 'rex/ui/text/output/file' - require 'rex/ui/text/color' + autoload :Stdio, 'rex/ui/text/output/stdio' + autoload :Socket, 'rex/ui/text/output/socket' + autoload :Buffer, 'rex/ui/text/output/buffer' + autoload :File, 'rex/ui/text/output/file' include Rex::Ui::Text::Color