Class: TurboRex::MSRPC::IStream
- Inherits:
-
Object
- Object
- TurboRex::MSRPC::IStream
- Defined in:
- lib/turborex/msrpc/decompiler.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
Instance Method Summary collapse
- #base_drift(drift) ⇒ Object
-
#initialize(isource, base) ⇒ IStream
constructor
A new instance of IStream.
- #read(len, offset = 0) ⇒ Object
- #reset ⇒ Object
- #set_base(base) ⇒ Object
Constructor Details
#initialize(isource, base) ⇒ IStream
Returns a new instance of IStream.
8 9 10 11 |
# File 'lib/turborex/msrpc/decompiler.rb', line 8 def initialize(isource, base) @isource = isource @base = @init_base = base end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
6 7 8 |
# File 'lib/turborex/msrpc/decompiler.rb', line 6 def base @base end |
Instance Method Details
#base_drift(drift) ⇒ Object
21 22 23 |
# File 'lib/turborex/msrpc/decompiler.rb', line 21 def base_drift(drift) @base += drift end |
#read(len, offset = 0) ⇒ Object
13 14 15 |
# File 'lib/turborex/msrpc/decompiler.rb', line 13 def read(len, offset=0) @isource.read(@base+offset, len) end |
#reset ⇒ Object
25 26 27 28 |
# File 'lib/turborex/msrpc/decompiler.rb', line 25 def reset @base = @init_base true end |
#set_base(base) ⇒ Object
17 18 19 |
# File 'lib/turborex/msrpc/decompiler.rb', line 17 def set_base(base) @base = base end |