Skip to content

Commit

Permalink
Try to search all profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
alxchk committed May 23, 2017
1 parent 7a3f183 commit 1fcaa76
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Linux/lazagne/softwares/browsers/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@
import sqlite3
import tempfile

import os

class Chrome(ModuleInfo):
def __init__(self):
options = {'command': '-C', 'action': 'store_true', 'dest': 'chrome', 'help': 'chrome'}
ModuleInfo.__init__(self, 'chrome', 'browsers', options)

def get_paths(self):
return homes.get(file=[
'.config/google-chrome/Default/Login Data',
'.config/chromium/Default/Login Data'
])
for profile_dir in homes.get(dir=['.config/google-chrome', '.config/chromium']):
try:
subdirs = os.listdir(profile_dir)
except:
continue

for subdir in subdirs:
logins = os.path.join(profile_dir, subdir, 'Login Data')
if os.path.isfile(logins):
yield logins

def get_logins(self, path):
try:
Expand Down

0 comments on commit 1fcaa76

Please sign in to comment.