Sha256: 7450257f30178c522de71f8b9116a5f84625b625331e0d3478adc531f1351234

Contents?: true

Size: 710 Bytes

Versions: 1

Compression:

Stored size: 710 Bytes

Contents

require_relative 'browser'
module CloudbleedChecker
  class Chrome < Browser
    TIMESTAMP_MAGIC_NUMBER = 11644473600 # No idea where this came from, should probaby figure that out from the chrome source
    TIMESTAMP_DIVISOR = 1_000_000 # convert usec to seconds

    self.history_db_glob = "~/Library/Application Support/Google/Chrome/*/History"

    def extract_domains
      with_databases do |db|
        ds = db[:urls].
          select(:url, :last_visit_time).
          where("(last_visit_time/?) - ? >= ?", TIMESTAMP_DIVISOR, TIMESTAMP_MAGIC_NUMBER, CloudbleedChecker::INITIAL_VULNERABILITY_RELEASED.to_i).
          order(:last_visit_time)
        extract_hosts(ds, :url)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cloudbleed_checker-0.1.0 lib/cloudbleed_checker/chrome.rb