# -*- coding: binary -*-12module Rex3Root = File.join(File.expand_path(File.dirname(__FILE__)), 'rex')4LogSource = "rex"5end67#8# REX Gems9#1011# Text manipulation library for things like generating random string12require 'rex/text'13# Library for Generating Randomized strings valid as Identifiers such as variable names14require 'rex/random_identifier'15# library for creating Powershell scripts for exploitation purposes16require 'rex/powershell'17# Library for processing and creating Zip compatible archives18require 'rex/zip'19# Library for parsing offline Windows Registry files20require 'rex/registry'21# Library for parsing Java serialized streams22require 'rex/java'23# Library for creating C-style Structs24require 'rex/struct2'25# Library for working with OLE26require 'rex/ole'27# Library for creating and/or parsing MIME messages28require 'rex/mime'29# Library for polymorphic encoders30require 'rex/encoder'31# Architecture subsystem32require 'rex/arch'33# Exploit Helper Library34require 'rex/exploitation'3536# Generic classes37require 'rex/file'3839# Thread safety and synchronization40require 'rex/sync'4142# Assembly43require 'rex/assembly/nasm'4445# Logging46require 'rex/logging/log_dispatcher'4748# IO49require 'rex/io/stream'50require 'rex/io/stream_abstraction'51require 'rex/io/stream_server'5253# Sockets54require 'rex/socket'5556# Compatibility57require 'rex/compat'5859# SSLScan60require 'rex/sslscan/scanner'61require 'rex/sslscan/result'6263# Versions64require 'rex/version'6566# Overload the Kernel.sleep() function to be thread-safe67Kernel.class_eval(<<-EOF, __FILE__, __LINE__ + 1)68def sleep(seconds=nil)69Rex::ThreadSafe.sleep(seconds)70end71EOF7273# Overload the Kernel.select function to be thread-safe74Kernel.class_eval(<<-EOF, __FILE__, __LINE__ + 1)75def select(rfd = nil, wfd = nil, efd = nil, to = nil)76Rex::ThreadSafe.select(rfd, wfd, efd, to)77end78EOF7980# Add the deprecated File.exists? method to call non-deprecated File.exist?81File.class_eval(<<-EOF, __FILE__, __LINE__ + 1)82def File.exists?(fname)83File.exist?(fname)84end85EOF868788