OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
ruby
/
2.5.0
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/10/2020 11:55:58 AM
rwxr-xr-x
📄
English.rb
6.31 KB
08/25/2017 03:47:04 PM
rw-r--r--
📄
abbrev.rb
3.49 KB
02/09/2017 04:12:00 PM
rw-r--r--
📄
base64.rb
3.3 KB
02/10/2017 12:58:47 AM
rw-r--r--
📄
benchmark.rb
17.89 KB
01/03/2017 02:00:01 AM
rw-r--r--
📁
bigdecimal
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📁
cgi
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
cgi.rb
9.8 KB
02/18/2017 05:52:16 AM
rw-r--r--
📄
cmath.rb
9.49 KB
12/12/2017 11:56:25 AM
rw-r--r--
📄
csv.rb
82.88 KB
09/12/2017 08:38:06 AM
rw-r--r--
📄
date.rb
1003 bytes
05/15/2023 11:41:43 AM
rw-r--r--
📄
debug.rb
29.97 KB
01/05/2017 01:00:01 AM
rw-r--r--
📄
delegate.rb
10.44 KB
12/12/2017 11:56:25 AM
rw-r--r--
📁
digest
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
digest.rb
2.83 KB
05/15/2023 11:41:43 AM
rw-r--r--
📁
drb
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
drb.rb
50 bytes
12/16/2015 05:07:31 AM
rw-r--r--
📄
e2mmap.rb
3.94 KB
03/01/2017 11:37:30 AM
rw-r--r--
📄
erb.rb
27.46 KB
01/03/2018 06:11:47 PM
rw-r--r--
📄
expect.rb
2.17 KB
05/15/2023 11:41:43 AM
rw-r--r--
📁
fiddle
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
fiddle.rb
1.68 KB
05/15/2023 11:41:43 AM
rw-r--r--
📄
fileutils.rb
44.15 KB
12/22/2017 08:00:10 AM
rw-r--r--
📄
find.rb
2.47 KB
09/15/2017 05:00:49 PM
rw-r--r--
📁
forwardable
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
forwardable.rb
8.49 KB
12/12/2017 11:56:25 AM
rw-r--r--
📄
getoptlong.rb
15.42 KB
09/02/2017 02:05:34 AM
rw-r--r--
📁
io
-
02/10/2020 11:55:58 AM
rwxr-xr-x
📄
ipaddr.rb
19.51 KB
12/12/2017 11:56:25 AM
rw-r--r--
📁
irb
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
irb.rb
20.48 KB
02/21/2018 06:00:51 AM
rw-r--r--
📁
json
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
json.rb
1.77 KB
05/15/2023 11:41:43 AM
rw-r--r--
📄
kconv.rb
5.77 KB
05/15/2023 11:41:43 AM
rw-r--r--
📄
logger.rb
23.54 KB
12/21/2017 05:07:43 AM
rw-r--r--
📁
matrix
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
matrix.rb
53.2 KB
12/12/2017 11:56:25 AM
rw-r--r--
📄
mkmf.rb
84.38 KB
05/15/2023 11:41:43 AM
rw-r--r--
📄
monitor.rb
7.26 KB
10/08/2017 07:00:01 AM
rw-r--r--
📄
mutex_m.rb
2.02 KB
10/08/2017 07:00:01 AM
rw-r--r--
📁
net
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
observer.rb
5.83 KB
01/13/2017 12:08:29 PM
rw-r--r--
📄
open-uri.rb
25.11 KB
12/21/2017 02:15:04 PM
rw-r--r--
📄
open3.rb
20.94 KB
10/21/2017 07:00:58 AM
rw-r--r--
📁
openssl
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
openssl.rb
469 bytes
05/15/2023 11:41:43 AM
rw-r--r--
📄
optionparser.rb
59 bytes
12/16/2015 05:07:31 AM
rw-r--r--
📁
optparse
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
optparse.rb
57.25 KB
07/24/2017 01:56:04 AM
rw-r--r--
📄
ostruct.rb
10.16 KB
12/12/2017 11:56:25 AM
rw-r--r--
📄
pathname.rb
16.09 KB
05/15/2023 11:41:43 AM
rw-r--r--
📄
pp.rb
14.36 KB
12/18/2017 01:51:53 AM
rw-r--r--
📄
prettyprint.rb
15.89 KB
11/10/2015 11:48:14 AM
rw-r--r--
📄
prime.rb
12.48 KB
05/20/2017 10:21:44 AM
rw-r--r--
📄
profile.rb
235 bytes
01/15/2017 02:56:04 AM
rw-r--r--
📄
profiler.rb
4.54 KB
01/18/2017 12:35:10 PM
rw-r--r--
📄
pstore.rb
14.7 KB
01/17/2017 12:47:38 PM
rw-r--r--
📁
psych
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
psych.rb
16.54 KB
05/15/2023 11:41:43 AM
rw-r--r--
📁
racc
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📁
rdoc
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
rdoc.rb
5.03 KB
12/23/2017 11:33:09 PM
rw-r--r--
📄
resolv-replace.rb
1.76 KB
11/14/2015 08:25:30 AM
rw-r--r--
📄
resolv.rb
72.73 KB
12/20/2017 04:25:01 AM
rw-r--r--
📁
rexml
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📁
rinda
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📁
ripper
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
ripper.rb
2.44 KB
05/15/2023 11:41:43 AM
rw-r--r--
📁
rss
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
rss.rb
2.87 KB
12/16/2015 05:07:31 AM
rw-r--r--
📁
rubygems
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
rubygems.rb
36.57 KB
03/19/2018 08:27:04 AM
rw-r--r--
📄
scanf.rb
23.56 KB
10/21/2017 12:34:13 PM
rw-r--r--
📄
securerandom.rb
8.61 KB
10/25/2017 07:28:22 AM
rw-r--r--
📄
set.rb
24.01 KB
11/22/2017 09:13:51 PM
rw-r--r--
📁
shell
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
shell.rb
11.37 KB
11/05/2016 11:58:02 PM
rw-r--r--
📄
shellwords.rb
6.66 KB
11/05/2016 04:58:48 AM
rw-r--r--
📄
singleton.rb
4.04 KB
10/08/2017 07:00:01 AM
rw-r--r--
📄
socket.rb
43.51 KB
05/15/2023 11:41:43 AM
rw-r--r--
📄
sync.rb
7.29 KB
09/18/2016 10:24:48 AM
rw-r--r--
📁
syslog
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
tempfile.rb
11.14 KB
12/12/2017 11:56:25 AM
rw-r--r--
📄
thwait.rb
3.33 KB
10/08/2017 07:00:01 AM
rw-r--r--
📄
time.rb
22.38 KB
05/15/2023 11:41:43 AM
rw-r--r--
📄
timeout.rb
3.81 KB
12/12/2017 11:56:25 AM
rw-r--r--
📄
tmpdir.rb
4.12 KB
03/28/2018 12:54:26 PM
rw-r--r--
📄
tracer.rb
6.42 KB
10/08/2017 07:00:01 AM
rw-r--r--
📄
tsort.rb
14.3 KB
11/14/2015 08:46:11 AM
rw-r--r--
📄
un.rb
9.78 KB
07/05/2017 09:05:53 AM
rw-r--r--
📁
unicode_normalize
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📁
uri
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
uri.rb
3.1 KB
12/16/2015 05:07:31 AM
rw-r--r--
📄
weakref.rb
1.44 KB
10/24/2017 06:08:00 PM
rw-r--r--
📁
webrick
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
webrick.rb
6.72 KB
12/23/2015 03:43:23 AM
rw-r--r--
📁
yaml
-
05/09/2024 07:14:11 AM
rwxr-xr-x
📄
yaml.rb
1.73 KB
12/12/2017 11:56:25 AM
rw-r--r--
Editing: singleton.rb
Close
# frozen_string_literal: false # The Singleton module implements the Singleton pattern. # # == Usage # # To use Singleton, include the module in your class. # # class Klass # include Singleton # # ... # end # # This ensures that only one instance of Klass can be created. # # a,b = Klass.instance, Klass.instance # # a == b # # => true # # Klass.new # # => NoMethodError - new is private ... # # The instance is created at upon the first call of Klass.instance(). # # class OtherKlass # include Singleton # # ... # end # # ObjectSpace.each_object(OtherKlass){} # # => 0 # # OtherKlass.instance # ObjectSpace.each_object(OtherKlass){} # # => 1 # # # This behavior is preserved under inheritance and cloning. # # == Implementation # # This above is achieved by: # # * Making Klass.new and Klass.allocate private. # # * Overriding Klass.inherited(sub_klass) and Klass.clone() to ensure that the # Singleton properties are kept when inherited and cloned. # # * Providing the Klass.instance() method that returns the same object each # time it is called. # # * Overriding Klass._load(str) to call Klass.instance(). # # * Overriding Klass#clone and Klass#dup to raise TypeErrors to prevent # cloning or duping. # # == Singleton and Marshal # # By default Singleton's #_dump(depth) returns the empty string. Marshalling by # default will strip state information, e.g. instance variables and taint # state, from the instance. Classes using Singleton can provide custom # _load(str) and _dump(depth) methods to retain some of the previous state of # the instance. # # require 'singleton' # # class Example # include Singleton # attr_accessor :keep, :strip # def _dump(depth) # # this strips the @strip information from the instance # Marshal.dump(@keep, depth) # end # # def self._load(str) # instance.keep = Marshal.load(str) # instance # end # end # # a = Example.instance # a.keep = "keep this" # a.strip = "get rid of this" # a.taint # # stored_state = Marshal.dump(a) # # a.keep = nil # a.strip = nil # b = Marshal.load(stored_state) # p a == b # => true # p a.keep # => "keep this" # p a.strip # => nil # module Singleton # Raises a TypeError to prevent cloning. def clone raise TypeError, "can't clone instance of singleton #{self.class}" end # Raises a TypeError to prevent duping. def dup raise TypeError, "can't dup instance of singleton #{self.class}" end # By default, do not retain any state when marshalling. def _dump(depth = -1) '' end module SingletonClassMethods # :nodoc: def clone # :nodoc: Singleton.__init__(super) end # By default calls instance(). Override to retain singleton state. def _load(str) instance end private def inherited(sub_klass) super Singleton.__init__(sub_klass) end end class << Singleton # :nodoc: def __init__(klass) # :nodoc: klass.instance_eval { @singleton__instance__ = nil @singleton__mutex__ = Thread::Mutex.new } def klass.instance # :nodoc: return @singleton__instance__ if @singleton__instance__ @singleton__mutex__.synchronize { return @singleton__instance__ if @singleton__instance__ @singleton__instance__ = new() } @singleton__instance__ end klass end private # extending an object with Singleton is a bad idea undef_method :extend_object def append_features(mod) # help out people counting on transitive mixins unless mod.instance_of?(Class) raise TypeError, "Inclusion of the OO-Singleton module in module #{mod}" end super end def included(klass) super klass.private_class_method :new, :allocate klass.extend SingletonClassMethods Singleton.__init__(klass) end end ## # :singleton-method: _load # By default calls instance(). Override to retain singleton state. end