# -*- coding: binary -*-
module Rex
module ImageSource
class ImageSource
#
# Um, just some abstract class stuff I guess, this is the interface
# that any image sources should subscribe to...
def subsource(offset, len)
raise "do something"
end
def size
def file_offset
def close
def read_asciiz(offset)
# FIXME, make me better
string = ''
loop do
begin
char = read(offset, 1)
rescue RangeError
break
break if char.nil? || char == "\x00"
offset += 1
string << char
return string