Skip to content

Commit

Permalink
Divide Chromium-based browser passwords according to browser
Browse files Browse the repository at this point in the history
  • Loading branch information
plonibarploni committed Jun 30, 2020
1 parent e36a6f8 commit 6f0230f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
5 changes: 0 additions & 5 deletions Linux/lazagne/config/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,3 @@ class constant():
st = None # Standard output
modules_dic = {}
chrome_storage = [] # Retrieved from libsecrets module
chrome_dirs = [
u'.config/google-chrome',
u'.config/chromium',
u'.config/BraveSoftware/Brave-Browser'
]
6 changes: 3 additions & 3 deletions Linux/lazagne/config/manage_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# browsers
from lazagne.softwares.browsers.mozilla import firefox_browsers
from lazagne.softwares.browsers.opera import Opera
from lazagne.softwares.browsers.chrome import Chrome
from lazagne.softwares.browsers.chrome import chrome_browsers
# sysadmin
from lazagne.softwares.sysadmin.apachedirectorystudio import ApacheDirectoryStudio
from lazagne.softwares.sysadmin.filezilla import Filezilla
Expand Down Expand Up @@ -71,7 +71,7 @@ def get_modules():
Fstab(),
# Mozilla(),
Opera(),
Chrome(),
#Chrome(),
Pidgin(),
PSI(),
Shadow(),
Expand All @@ -98,4 +98,4 @@ def get_modules():
# except:
# pass

return module_names + firefox_browsers
return module_names + chrome_browsers + firefox_browsers
17 changes: 14 additions & 3 deletions Linux/lazagne/softwares/browsers/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@


class Chrome(ModuleInfo):
def __init__(self):
ModuleInfo.__init__(self, 'chrome', 'browsers')
def __init__(self, browser_name, path):
self.path = path
ModuleInfo.__init__(self, browser_name, category='browsers')
self.enc_config = {
'iv': b' ' * 16,
'length': 16,
Expand All @@ -28,7 +29,7 @@ def __init__(self):
self.AES_BLOCK_SIZE = 16

def get_paths(self):
for profile_dir in homes.get(directory=constant.chrome_dirs):
for profile_dir in homes.get(directory=self.path):
try:
subdirs = os.listdir(profile_dir)
except Exception:
Expand Down Expand Up @@ -125,3 +126,13 @@ def run(self):
all_passwords.append(pw)

return all_passwords


# Name, path
chrome_browsers = [
(u'Google Chrome', u'.config/google-chrome'),
(u'Chromium', u'.config/chromium'),
(u'Brave', u'.config/BraveSoftware/Brave-Browser'),
]

chrome_browsers = [Chrome(browser_name=name, path=path) for name, path in chrome_browsers]

0 comments on commit 6f0230f

Please sign in to comment.