Method: Rex::Post::FileStat#update

Defined in:
lib/rex/post/file_stat.rb

#update(buf) ⇒ Object



75
76
77
78
79
80
81
82
83
84
85
# File 'lib/rex/post/file_stat.rb', line 75

def update(buf)

  # XXX: This needs to understand more than just 'stat' structures
  # Windows can also return _stat32, _stat32i64, _stat64i32, and _stat64 structures

  skeys = %W{st_dev st_ino st_mode st_wtf st_nlink st_uid st_gid st_rdev st_size st_ctime st_atime st_mtime}
  svals = buf.unpack("VvvvvvvVVVVV")
  skeys.each_index do |i|
    self.stathash[ skeys[i] ] = svals[i]
  end
end