Update totalrecall.py

This commit is contained in:
xaitax
2024-06-06 21:25:52 +02:00
parent 28a9f75de0
commit 2825c29d5d

View File

@@ -4,8 +4,9 @@ import sqlite3
from datetime import datetime, timedelta
import getpass
import argparse
import subprocess
VERSION = "0.2"
VERSION = "0.3"
BLUE = "\033[94m"
GREEN = "\033[92m"
@@ -24,6 +25,13 @@ v""" + VERSION + """ / Alexander Hagenah / @xaitax / ah@primepage.de
"""
print(BLUE + banner + ENDC)
def modify_permissions(path):
try:
subprocess.run(['icacls', path, '/grant', f'{getpass.getuser()}:F'], check=True)
print(f"{GREEN}✅ Permissions modified for {path}{ENDC}")
except subprocess.CalledProcessError as e:
print(f"{RED}❌ Failed to modify permissions for {path}: {e}{ENDC}")
def main(from_date=None, to_date=None, search_term=None):
display_banner()
username = getpass.getuser()
@@ -50,6 +58,9 @@ def main(from_date=None, to_date=None, search_term=None):
print("🚫 Windows Recall feature not found. Nothing to extract.")
return
modify_permissions(db_path)
modify_permissions(image_store_path)
proceed = input("🟢 Windows Recall feature found. Do you want to proceed with the extraction? (yes/no): ")
if proceed.lower() != 'yes':
print("⚠️ Extraction aborted.")