Exemplo n.º 1
0
 def exportBookmarks(self):
     if os.path.isfile(self.profileFolder + self.bookmarksFile):
         chromeJsonData = utils.readJSONDataFile(self.profileFolder +
                                                 self.bookmarksFile)
         self.jsonExportData["bookmarks"][0]["children"] = chromeJsonData[
             "roots"]["bookmark_bar"]["children"]
         self.jsonExportData["bookmarks"][1]["children"] = chromeJsonData[
             "roots"]["other"]["children"]
Exemplo n.º 2
0
    def __init__(self, profileFolder, path):
        super().__init__()
        self.bookmarksFile = "Bookmarks"
        self.openTabsFile = "/home/blink/.config/shared.pkl"
        self.passwordsFile = "Login\ Data"
        self.profileFolder = profileFolder
        self.chromePath = path

        jsonDataStructure = {
            "bookmarks": [{
                "name": "Bookmarks Toolbar",
                "children": [],
                "type": "folder"
            }, {
                "name": "Bookmarks Menu",
                "children": [],
                "type": "folder"
            }, {
                "name": "Unsorted Bookmarks",
                "children": [],
                "type": "folder"
            }],
            "openTabs": [],
            "passwords": [],
            "passwordStorage":
            False,
            "passwordEncryption":
            False,
            "refresh":
            False,
            "browser":
            "Chrome"
        }

        if os.path.isfile(self.dataPath):
            self.jsonImportData = utils.readJSONDataFile(self.dataPath)
            self.passwordStorage = self.jsonImportData["passwordStorage"]
            self.passwordEncryption = self.jsonImportData["passwordEncryption"]

        else:
            self.jsonImportData = jsonDataStructure
            self.passwordStorage = False
            self.passwordEncryption = False

        self.jsonExportData = jsonDataStructure
        self.jsonExportData["passwordStorage"] = self.passwordStorage
        self.jsonExportData["passwordEncryption"] = self.passwordEncryption
Exemplo n.º 3
0
    def __init__(self):
        super().__init__()
        self.bookmarksFile = "Bookmarks"
        self.openTabsFile = "shared.pkl"
        self.passwordsFile = "Login\ Data"
        self.profileFolder = utils.relativeToAbsoluteHomePath(
            "~/.config/google-chrome/Default/")

        jsonDataStructure = {
            "bookmarks": [{
                "name": "Bookmarks Toolbar",
                "children": [],
                "type": "folder"
            }, {
                "name": "Bookmarks Menu",
                "children": [],
                "type": "folder"
            }, {
                "name": "Unsorted Bookmarks",
                "children": [],
                "type": "folder"
            }],
            "openTabs": [],
            "passwords": [],
            "passwordStorage":
            False,
            "passwordEncryption":
            False,
            "browser":
            "Chrome"
        }

        if os.path.isfile(self.dataPath):
            self.jsonImportData = utils.readJSONDataFile(self.dataPath)
            self.passwordStorage = self.jsonImportData["passwordStorage"]
            self.passwordEncryption = self.jsonImportData["passwordEncryption"]

        else:
            self.jsonImportData = jsonDataStructure
            self.passwordStorage = False
            self.passwordEncryption = False

        self.jsonExportData = jsonDataStructure
        self.jsonExportData["passwordStorage"] = self.passwordStorage
        self.jsonExportData["passwordEncryption"] = self.passwordEncryption
Exemplo n.º 4
0
 def __init__(self):
     super().__init__()
     self.bookmarksFile = "Bookmarks"
     self.openTabsFile = "shared.pkl"
     self.passwordsFile = "Login\ Data"
     self.profileFolder = utils.relativeToAbsoluteHomePath("~/.config/google-chrome/Default/")
     
     jsonDataStructure = {"bookmarks":[{"name":"Bookmarks Toolbar",
                                 "children":[],
                                 "type":"folder"},
                                {"name":"Bookmarks Menu",
                                 "children":[],
                                 "type":"folder"},
                                {"name":"Unsorted Bookmarks",
                                 "children":[],
                                 "type":"folder"}
                                ],
                   "openTabs":[],
                   "passwords":[],
                   "passwordStorage":False,
                   "passwordEncryption":False,
                   "browser":"Chrome"}
     
     if os.path.isfile(self.dataPath):
         self.jsonImportData = utils.readJSONDataFile(self.dataPath)
         self.passwordStorage = self.jsonImportData["passwordStorage"]
         self.passwordEncryption = self.jsonImportData["passwordEncryption"]
         
     else :
         self.jsonImportData = jsonDataStructure
         self.passwordStorage = False
         self.passwordEncryption = False
     
     self.jsonExportData  = jsonDataStructure
     self.jsonExportData["passwordStorage"] = self.passwordStorage 
     self.jsonExportData["passwordEncryption"] = self.passwordEncryption
Exemplo n.º 5
0
 def exportData(self):
     jsonExportData = utils.readJSONDataFile(self.dataPath)
     return jsonExportData["passwordEncryption"]
Exemplo n.º 6
0
 def exportData(self):
     jsonExportData = utils.readJSONDataFile(self.dataPath)
     return jsonExportData["passwordEncryption"]