Class: CloudbleedChecker::Chrome
- Defined in:
- lib/cloudbleed_checker/chrome.rb
Constant Summary collapse
- TIMESTAMP_MAGIC_NUMBER =
No idea where this came from, should probaby figure that out from the chrome source
11644473600
- TIMESTAMP_DIVISOR =
convert usec to seconds
1_000_000
Instance Method Summary collapse
Methods inherited from Browser
extract_domains, #extract_host, #extract_hosts, #history_db_glob, #history_db_path, #initialize, #with_database, #with_databases
Constructor Details
This class inherits a constructor from CloudbleedChecker::Browser
Instance Method Details
#extract_domains ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/cloudbleed_checker/chrome.rb', line 9 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 |