2005-06-03 12:51:51 +08:00
|
|
|
module Rex
|
2005-07-18 15:46:54 +08:00
|
|
|
Root = File.join(File.dirname(__FILE__), 'rex')
|
2005-10-31 07:40:27 +08:00
|
|
|
LogSource = "rex"
|
2005-06-03 12:51:51 +08:00
|
|
|
end
|
|
|
|
|
2005-06-04 16:23:16 +08:00
|
|
|
# Generic classes
|
2005-07-10 05:18:49 +08:00
|
|
|
require 'rex/constants'
|
|
|
|
require 'rex/exceptions'
|
|
|
|
require 'rex/transformer'
|
2005-07-10 15:15:20 +08:00
|
|
|
require 'rex/text'
|
2005-07-22 11:32:06 +08:00
|
|
|
require 'rex/time'
|
2005-09-22 12:53:46 +08:00
|
|
|
require 'rex/job_container'
|
2005-11-02 22:18:50 +08:00
|
|
|
require 'rex/file'
|
2005-07-17 08:52:47 +08:00
|
|
|
|
|
|
|
# Thread safety and synchronization
|
2005-09-22 12:53:46 +08:00
|
|
|
require 'rex/sync/thread_safe'
|
|
|
|
require 'rex/sync/ref'
|
|
|
|
require 'rex/sync/read_write_lock'
|
2005-07-16 15:32:11 +08:00
|
|
|
require 'rex/sync/event'
|
2005-07-11 04:49:13 +08:00
|
|
|
|
|
|
|
# Encoding
|
|
|
|
require 'rex/encoder/xor'
|
|
|
|
require 'rex/encoding/xor'
|
|
|
|
|
|
|
|
# Architecture subsystem
|
2005-10-01 13:55:15 +08:00
|
|
|
require 'rex/arch'
|
2005-06-04 16:23:16 +08:00
|
|
|
|
|
|
|
# Logging
|
2005-07-10 05:18:49 +08:00
|
|
|
require 'rex/logging/log_dispatcher'
|
2005-06-04 16:23:16 +08:00
|
|
|
|
|
|
|
# IO
|
2005-07-10 05:18:49 +08:00
|
|
|
require 'rex/io/stream'
|
|
|
|
require 'rex/io/stream_server'
|
2005-06-03 12:51:51 +08:00
|
|
|
|
2005-06-04 16:23:16 +08:00
|
|
|
# Sockets
|
2005-07-10 05:18:49 +08:00
|
|
|
require 'rex/socket'
|
2005-06-04 16:23:16 +08:00
|
|
|
|
2005-07-10 15:15:20 +08:00
|
|
|
# Parsers
|
|
|
|
require 'rex/parser/arguments'
|
2005-07-16 06:30:04 +08:00
|
|
|
require 'rex/parser/ini'
|
2005-09-16 11:29:11 +08:00
|
|
|
|
|
|
|
# Overload the Kernel.sleep() function to be thread-safe
|
|
|
|
Kernel.class_eval("
|
|
|
|
def sleep (seconds)
|
|
|
|
Rex::ThreadSafe.sleep(seconds)
|
|
|
|
end
|
|
|
|
")
|
|
|
|
|
2005-09-27 13:31:48 +08:00
|
|
|
# Overload the Kernel.select function to be thread-safe
|
|
|
|
Kernel.class_eval("
|
|
|
|
def select(rfd = nil, wfd = nil, efd = nil, to = nil)
|
|
|
|
Rex::ThreadSafe.select(rfd, wfd, efd, to)
|
|
|
|
end
|
|
|
|
")
|
|
|
|
|