Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex.rb
19758 views
1
# -*- coding: binary -*-
2
3
module Rex
4
Root = File.join(File.expand_path(File.dirname(__FILE__)), 'rex')
5
LogSource = "rex"
6
end
7
8
#
9
# REX Gems
10
#
11
12
# Text manipulation library for things like generating random string
13
require 'rex/text'
14
# Library for Generating Randomized strings valid as Identifiers such as variable names
15
require 'rex/random_identifier'
16
# library for creating Powershell scripts for exploitation purposes
17
require 'rex/powershell'
18
# Library for processing and creating Zip compatible archives
19
require 'rex/zip'
20
# Library for parsing offline Windows Registry files
21
require 'rex/registry'
22
# Library for parsing Java serialized streams
23
require 'rex/java'
24
# Library for creating C-style Structs
25
require 'rex/struct2'
26
# Library for working with OLE
27
require 'rex/ole'
28
# Library for creating and/or parsing MIME messages
29
require 'rex/mime'
30
# Library for polymorphic encoders
31
require 'rex/encoder'
32
# Architecture subsystem
33
require 'rex/arch'
34
# Exploit Helper Library
35
require 'rex/exploitation'
36
37
# Generic classes
38
require 'rex/file'
39
40
# Thread safety and synchronization
41
require 'rex/sync'
42
43
# Assembly
44
require 'rex/assembly/nasm'
45
46
# Logging
47
require 'rex/logging/log_dispatcher'
48
49
# IO
50
require 'rex/io/stream'
51
require 'rex/io/stream_abstraction'
52
require 'rex/io/stream_server'
53
54
# Sockets
55
require 'rex/socket'
56
57
# Compatibility
58
require 'rex/compat'
59
60
# SSLScan
61
require 'rex/sslscan/scanner'
62
require 'rex/sslscan/result'
63
64
# Versions
65
require 'rex/version'
66
67
# Overload the Kernel.sleep() function to be thread-safe
68
Kernel.class_eval(<<-EOF, __FILE__, __LINE__ + 1)
69
def sleep(seconds=nil)
70
Rex::ThreadSafe.sleep(seconds)
71
end
72
EOF
73
74
# Overload the Kernel.select function to be thread-safe
75
Kernel.class_eval(<<-EOF, __FILE__, __LINE__ + 1)
76
def select(rfd = nil, wfd = nil, efd = nil, to = nil)
77
Rex::ThreadSafe.select(rfd, wfd, efd, to)
78
end
79
EOF
80
81
# Add the deprecated File.exists? method to call non-deprecated File.exist?
82
File.class_eval(<<-EOF, __FILE__, __LINE__ + 1)
83
def File.exists?(fname)
84
File.exist?(fname)
85
end
86
EOF
87
88