Class: Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::ApiConstants
- Inherits:
-
Object
- Object
- Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::ApiConstants
- Defined in:
- lib/rex/post/meterpreter/extensions/stdapi/railgun/const_manager.rb
Overview
A container holding useful API Constants.
Direct Known Subclasses
Def::DefApiConstants_linux, Def::DefApiConstants_osx, Def::DefApiConstants_windows
Class Attribute Summary collapse
-
.manager_semaphore ⇒ Object
Returns the value of attribute manager_semaphore.
Class Method Summary collapse
- .inherited(child_class) ⇒ Object
-
.manager ⇒ Object
Provides a frozen constant manager for the constants defined in self.add_constants.
Class Attribute Details
.manager_semaphore ⇒ Object
Returns the value of attribute manager_semaphore.
47 48 49 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/const_manager.rb', line 47 def manager_semaphore @manager_semaphore end |
Class Method Details
.inherited(child_class) ⇒ Object
50 51 52 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/const_manager.rb', line 50 def self.inherited(child_class) child_class.manager_semaphore = Mutex.new end |
.manager ⇒ Object
Provides a frozen constant manager for the constants defined in self.add_constants
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/const_manager.rb', line 58 def self.manager # The first check for nil is to potentially skip the need to synchronize if @manager.nil? # Looks like we MAY need to load manager @manager_semaphore.synchronize do # We check once more. Now our options are synchronized if @manager.nil? @manager = ConstManager.new self.add_constants(@manager) @manager.freeze end end end return @manager end |