Class: Rex::ImageSource::ImageSource

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/image_source/image_source.rb

Instance Method Summary collapse

Instance Method Details

#closeObject



24
25
26
# File 'lib/rex/image_source/image_source.rb', line 24

def close
  raise "do something"
end

#file_offsetObject



20
21
22
# File 'lib/rex/image_source/image_source.rb', line 20

def file_offset
  raise "do something"
end

#read_asciiz(offset) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/rex/image_source/image_source.rb', line 28

def read_asciiz(offset)
  # FIXME, make me better
  string = ''
  loop do
    begin
      char = read(offset, 1)
    rescue RangeError
      break
    end
    break if char.nil? || char == "\x00"
    offset += 1
    string << char
  end
  return string
end

#sizeObject



16
17
18
# File 'lib/rex/image_source/image_source.rb', line 16

def size
  raise "do something"
end

#subsource(offset, len) ⇒ Object

Um, just some abstract class stuff I guess, this is the interface that any image sources should subscribe to…



12
13
14
# File 'lib/rex/image_source/image_source.rb', line 12

def subsource(offset, len)
  raise "do something"
end