# -*- coding: binary -*- ### # # framework-util-svn # -------------- # # The class provides methods for parsing the SVN information in the framework directory # ### require 'date' module Msf module Util class SVN def self.load_root info = {} path = ::File.join(::File.dirname(__FILE__), "..", "..", "..", ".svn", "entries") if !::File.exists?(path) return info end contents = '' File.open(path, "rb") do |fd| contents = fd.read(::File.size(path)) end if contents.include? " 7) "%red#{diff.to_i} days ago%clr" else "#{diff.to_i} days ago" end end end def self.last_updated_date @@info ||= load_root svnt = @@info[:updated] if(not svnt) return end begin Date.parse(@@info[:updated]) rescue ArgumentError end end end end end