mirror of
https://github.com/xaitax/TotalRecall.git
synced 2025-09-13 16:43:14 +10:00
Update totalrecall.py
This commit is contained in:
parent
28a9f75de0
commit
2825c29d5d
@ -4,8 +4,9 @@ import sqlite3
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import getpass
|
import getpass
|
||||||
import argparse
|
import argparse
|
||||||
|
import subprocess
|
||||||
|
|
||||||
VERSION = "0.2"
|
VERSION = "0.3"
|
||||||
|
|
||||||
BLUE = "\033[94m"
|
BLUE = "\033[94m"
|
||||||
GREEN = "\033[92m"
|
GREEN = "\033[92m"
|
||||||
@ -24,6 +25,13 @@ v""" + VERSION + """ / Alexander Hagenah / @xaitax / ah@primepage.de
|
|||||||
"""
|
"""
|
||||||
print(BLUE + banner + ENDC)
|
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):
|
def main(from_date=None, to_date=None, search_term=None):
|
||||||
display_banner()
|
display_banner()
|
||||||
username = getpass.getuser()
|
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.")
|
print("🚫 Windows Recall feature not found. Nothing to extract.")
|
||||||
return
|
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): ")
|
proceed = input("🟢 Windows Recall feature found. Do you want to proceed with the extraction? (yes/no): ")
|
||||||
if proceed.lower() != 'yes':
|
if proceed.lower() != 'yes':
|
||||||
print("⚠️ Extraction aborted.")
|
print("⚠️ Extraction aborted.")
|
||||||
|
Loading…
Reference in New Issue
Block a user