Sha256: e0a98812b35785783444a57febe161dfb5dd066027a616f7ae32c82c8766caf7
Contents?: true
Size: 613 Bytes
Versions: 43
Compression:
Stored size: 613 Bytes
Contents
#!/usr/bin/env ruby # $Id: memory.rb 5401 2008-02-09 04:35:21Z ramon $ require 'rex/image_source/image_source' require 'rex/struct2' module Rex module ImageSource class Memory < ImageSource attr_accessor :rawdata, :size, :file_offset def initialize(_rawdata, _file_offset = 0) self.rawdata = _rawdata self.size = _rawdata.length self.file_offset = _file_offset end def read(offset, len) rawdata[offset, len] end def subsource(offset, len) self.class.new(rawdata[offset, len], offset + file_offset) end def close end def index(*args) rawdata.index(*args) end end end end
Version data entries
43 entries across 43 versions & 1 rubygems