Adguard Reset | Trial
def clear_registry_windows(self): """Clear Windows registry entries""" if self.system != "Windows": return import winreg registry_paths = [ (winreg.HKEY_CURRENT_USER, r"Software\AdGuard"), (winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\AdGuard"), ] trial_keys = [ "TrialStartDate", "TrialEndDate", "InstallDate", "FirstRunDate", "LicenseKey", "ActivationDate", "TrialUsed", "TrialCount", "LicenseExpires" ] for hkey, subkey in registry_paths: try: key = winreg.OpenKey(hkey, subkey, 0, winreg.KEY_ALL_ACCESS) for trial_key in trial_keys: try: winreg.DeleteValue(key, trial_key) except: pass winreg.CloseKey(key) except: pass print(" ā Registry entries cleared")
def run(self): """Main execution""" print("\n" + "="*50) print(" AdGuard Trial Reset Tool") print(" Educational Purpose Only") print("="*50 + "\n") response = input("Continue? (y/N): ") if response.lower() != 'y': print("Cancelled.") return self.stop_processes() self.clear_registry_windows() self.clear_app_data() self.clear_sqlite_db() self.modify_hosts_file() self.reset_trial_markers() print("\nā Trial reset completed!") print("Please restart AdGuard to apply changes.\n") if == " main ": if os.geteuid() != 0 and platform.system() != "Windows": print("This script requires root privileges!") sys.exit(1)
Write-Host " ā Event logs processed" -ForegroundColor Green function Set-NewTrialMarkers Write-Host "[5/5] Setting new trial markers..." -ForegroundColor Yellow Adguard Reset Trial
:: Check for Administrator privileges net session >nul 2>&1 if %errorLevel% neq 0 ( echo Requesting Administrator privileges... powershell -Command "Start-Process '%~f0' -Verb RunAs" exit /b )
Write-Host " ā Application data cleared" -ForegroundColor Green function Clear-EventLogs Write-Host "[4/5] Clearing related event logs..." -ForegroundColor Yellow Batch Wrapper (Run
# Run as Administrator powershell -ExecutionPolicy Bypass -File AdGuardTrialReset.ps1 powershell -ExecutionPolicy Bypass -File AdGuardTrialReset.ps1 -Silent -Force
pause #!/usr/bin/env python3 """ AdGuard Trial Reset Tool - Python Version Cross-platform implementation for educational purposes """ import os import sys import time import shutil import platform from pathlib import Path import subprocess import sqlite3 import json from datetime import datetime, timedelta ] trial_keys = [ "TrialStartDate"
def _get_user_paths(self): """Get OS-specific paths""" paths = {} if self.system == "Windows": paths['appdata'] = Path(os.environ.get('APPDATA', '')) paths['localappdata'] = Path(os.environ.get('LOCALAPPDATA', '')) paths['programdata'] = Path(os.environ.get('PROGRAMDATA', '')) elif self.system == "Darwin": # macOS paths['appdata'] = Path.home() / "Library/Application Support" paths['localappdata'] = Path.home() / "Library" paths['programdata'] = Path.home() / "Library/Preferences" elif self.system == "Linux": paths['appdata'] = Path.home() / ".config" paths['localappdata'] = Path.home() / ".local/share" paths['programdata'] = Path('/etc') return paths
# Create fresh trial start date (yesterday) foreach ($regPath in $registryPaths) $actualPaths = Get-ChildItem -Path $regPath -ErrorAction SilentlyContinue foreach ($path in $actualPaths) Set-ItemProperty -Path $path.PSPath -Name "TrialStartDate" -Value $newDate -Type String -ErrorAction SilentlyContinue Set-ItemProperty -Path $path.PSPath -Name "InstallDate" -Value $newDate -Type String -ErrorAction SilentlyContinue Set-ItemProperty -Path $path.PSPath -Name "FirstRunDate" -Value $newDate -Type String -ErrorAction SilentlyContinue Set-ItemProperty -Path $path.PSPath -Name "TrialUsed" -Value "0" -Type DWord -ErrorAction SilentlyContinue
Main 2. Batch Wrapper (Run.bat) @echo off title AdGuard Trial Reset Tool color 0E echo ======================================== echo AdGuard Trial Reset Tool echo ======================================== echo.
$newDate = (Get-Date).AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss")