Class: CookieExtractor::FirefoxCookieExtractor
- Inherits:
-
Object
- Object
- CookieExtractor::FirefoxCookieExtractor
- Includes:
- Common
- Defined in:
- lib/cookie_extractor/firefox_cookie_extractor.rb
Instance Method Summary collapse
- #extract ⇒ Object
-
#initialize(cookie_file) ⇒ FirefoxCookieExtractor
constructor
A new instance of FirefoxCookieExtractor.
Constructor Details
#initialize(cookie_file) ⇒ FirefoxCookieExtractor
Returns a new instance of FirefoxCookieExtractor.
7 8 9 |
# File 'lib/cookie_extractor/firefox_cookie_extractor.rb', line 7 def initialize() @cookie_file = end |
Instance Method Details
#extract ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cookie_extractor/firefox_cookie_extractor.rb', line 11 def extract db = SQLite3::Database.new @cookie_file db.results_as_hash = true result = [] db.execute("SELECT * FROM moz_cookies") do |row| result << [ row['host'], true_false_word(is_domain_wide(row['host'])), row['path'], true_false_word(row['isSecure']), row['expiry'], row['name'], row['value'] ].join("\t") end db.close result end |