Skip to content

Commit

Permalink
Update to v1.5.2.6
Browse files Browse the repository at this point in the history
1. The error output while running --reset-eset-vpn became clearer
2. Updated documentation and screenshots
  • Loading branch information
rzc0d3r authored Dec 4, 2024
1 parent 20e3c5f commit 19fd945
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 64 deletions.
Binary file modified img/project_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 10 additions & 11 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

# ---- Quick settings [for Developers to quickly change behavior without changing all files] ----
VERSION = ['v1.5.2.5', 1525]
VERSION = ['v1.5.2.6', 1526]
LOGO = f"""
███████╗███████╗███████╗████████╗ ██╗ ██╗███████╗██╗ ██╗ ██████╗ ███████╗███╗ ██╗
██╔════╝██╔════╝██╔════╝╚══██╔══╝ ██║ ██╔╝██╔════╝╚██╗ ██╔╝██╔════╝ ██╔════╝████╗ ██║
Expand Down Expand Up @@ -68,8 +68,8 @@
from modules.EsetTools import EsetVPN as EV
from modules.EsetTools import EsetProtectHubRegister as EPHR
from modules.EsetTools import EsetProtectHubKeygen as EPHK
from modules.EsetTools import EsetVPNReset as EVR
from modules.EsetTools import EsetVPNResetMac as EVRM
from modules.EsetTools import EsetVPNResetWindows as EVRW
from modules.EsetTools import EsetVPNResetMacOS as EVRM

from modules.SharedTools import *
from modules.Updater import get_assets_from_version, parse_update_json, updater_main
Expand Down Expand Up @@ -214,7 +214,7 @@ def parse_argv():
args_modes.add_argument('--protecthub-account', action='store_true', help='Creating a ESET ProtectHub Account (To activate the free trial version)')
args_modes.add_argument('--only-webdriver-update', action='store_true', help='Updates/installs webdrivers and browsers without generating account and license key')
args_modes.add_argument('--update', action='store_true', help='Switching to program update mode - Overrides all arguments that are available!!!')
args_modes.add_argument('--reset-eset-vpn', action='store_true', help='Trying to reset the license in the ESET VPN application (Windows only) - Overrides all arguments that are available!!!')
args_modes.add_argument('--reset-eset-vpn', action='store_true', help='Trying to reset the license in the ESET VPN application (Windows & macOS only) - Overrides all arguments that are available!!!')
# Optional
args_parser.add_argument('--skip-webdriver-menu', action='store_true', help='Skips installation/upgrade webdrivers through the my custom wrapper (The built-in selenium-manager will be used)')
args_parser.add_argument('--no-headless', action='store_true', help='Shows the browser at runtime (The browser is hidden by default, but on Windows 7 this option is enabled by itself)')
Expand Down Expand Up @@ -260,14 +260,13 @@ def main(disable_exit=False):
time.sleep(3) # exit-delay
sys.exit(0)
elif args['reset_eset_vpn']:
print(f'{Fore.LIGHTMAGENTA_EX}-- Reset ESET VPN --{Fore.RESET}\n')
print(f'{Fore.LIGHTMAGENTA_EX}-- Reset ESET VPN --{Fore.RESET}\n')
if sys.platform == "darwin":
EVRM()
elif sys.platform.startswith('win'):
EVR()
else:
raise RuntimeError('This feature is for Windows and macOS only!!!')

EVRM()
elif sys.platform.startswith('win'):
EVRW()
else:
console_log('This feature is for Windows and macOS only!!!', ERROR)
if len(sys.argv) == 1:
input('\nPress Enter to exit...')
else:
Expand Down
66 changes: 28 additions & 38 deletions modules/EsetTools.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from .EmailAPIs import *

import subprocess
from subprocess import check_output, DEVNULL

from pathlib import Path

import subprocess
import colorama
import time
import sys

from pathlib import Path

class EsetRegister(object):
def __init__(self, registered_email_obj: OneSecEmailAPI, eset_password: str, driver: Chrome):
Expand Down Expand Up @@ -381,12 +379,10 @@ def getLicenseData(self):
console_log('Information successfully received!', OK)
return license_name, license_key, license_out_date

def EsetVPNReset(key_path='SOFTWARE\\ESET\\ESET VPN', value_name='authHash'):
def EsetVPNResetWindows(key_path='SOFTWARE\\ESET\\ESET VPN', value_name='authHash'):
"""Deletes the authHash value of ESET VPN"""
if not sys.platform.startswith('win'):
raise RuntimeError('This feature is for Windows only!!!')
try:
check_output(['taskkill', '/f', '/im', 'esetvpn.exe'], stderr=DEVNULL).decode('cp866', errors="ignore")
subprocess.check_output(['taskkill', '/f', '/im', 'esetvpn.exe'], stderr=subprocess.DEVNULL)
except:
pass
try:
Expand All @@ -395,34 +391,28 @@ def EsetVPNReset(key_path='SOFTWARE\\ESET\\ESET VPN', value_name='authHash'):
winreg.DeleteValue(key, value_name)
console_log(f'ESET VPN has been successfully reset!!!', OK)
except FileNotFoundError:
raise RuntimeError(f'The registry value or key does not exist: {key_path}\\{value_name}')
console_log(f'The registry value or key does not exist: {key_path}\\{value_name}', ERROR)
except PermissionError:
raise RuntimeError(f'Permission denied while accessing: {key_path}\\{value_name}')
console_log(f'Permission denied while accessing: {key_path}\\{value_name}', ERROR)
except Exception as e:
raise RuntimeError(e)

def EsetVPNResetMacOS(app_name='ESET VPN', file_name='Preferences/com.eset.ESET VPN.plist'):
try:
# Use AppleScript to quit the application
script = f'tell application "{app_name}" to quit'
subprocess.run(["osascript", "-e", script], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except:
pass
try:
time.sleep(2)
# Get the full path to the file in the Library folder
library_path = Path.home() / "Library" / file_name
# Check if the file exists and remove it
if library_path.is_file():
library_path.unlink()
console_log(f'ESET VPN has been successfully reset!!!', OK)
else:
console_log(f"File '{file_name}' does not exist!!!", ERROR)
except Exception as e:
raise RuntimeError(e)

def EsetVPNResetMac(app_name='ESET VPN', file_name='Preferences/com.eset.ESET VPN.plist'):

if not sys.platform == "darwin":
raise RuntimeError('This feature is for macOS only!!!')
try:
# Use AppleScript to quit the application
script = f'tell application "{app_name}" to quit'
subprocess.run(["osascript", "-e", script], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except:
pass

time.sleep(2)

try:
# Get the full path to the file in the Library folder
library_path = Path.home() / "Library" / file_name

# Check if the file exists and remove it
if library_path.is_file():
library_path.unlink()
console_log(f'ESET VPN has been successfully reset!!!', OK)
else:
print(f"File '{file_name}' does not exist.")
except Exception as e:
print(f"An error occurred: {e}")
raise RuntimeError(e)
2 changes: 1 addition & 1 deletion modules/WebDriverInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,4 +369,4 @@ def download():
os.chmod(webdriver_path, 0o755)
except:
pass
return [str(Path(webdriver_path).resolve()), str(Path(browser_path).resolve())]
return [str(Path(webdriver_path).resolve()), str(Path(browser_path).resolve())]
8 changes: 4 additions & 4 deletions wiki/AccountGenerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --account
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --account
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --account
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand All @@ -36,7 +36,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --business-account
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --protecthub-account
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --protecthub-account
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand All @@ -60,7 +60,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --account --custom-email-api
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --account --custom-email-api
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --account --custom-email-api
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand Down Expand Up @@ -91,7 +91,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --protecthub-account --custom-email-api
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --protecthub-account --custom-email-api
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --protecthub-account --custom-email-api
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand Down
2 changes: 1 addition & 1 deletion wiki/CommandLineArguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
| --protecthub-account | Creating a ESET ProtectHub Account (To activate the free trial version) - works only with ```mailticking```, ```fakemail``` and ```--custom-email-api``` |
| --only-webdriver-update | Updates/installs webdrivers and browsers without generating accounts and license keys |
| --update | Switching to program update mode - **Overrides all arguments that are available** |
| --reset-eset-vpn | Trying to reset the license in the ESET VPN application (Windows only) - **Overrides all arguments that are available** |
| --reset-eset-vpn | Trying to reset the license in the ESET VPN application (Windows & macOS only) - **Overrides all arguments that are available** |
--------------------------------------------------------------------------------------------------------------------------------------

# Optional
Expand Down
16 changes: 8 additions & 8 deletions wiki/KeyGenerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --key
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --key
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --key
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand All @@ -36,7 +36,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --small-business-key
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --small-business-key
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --small-business-key
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand All @@ -54,7 +54,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --advanced-key
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --advanced-key
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --advanced-key
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand All @@ -76,7 +76,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --vpn-codes
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --vpn-codes
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --vpn-codes
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand All @@ -97,7 +97,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --key --custom-email-api
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --key --custom-email-api
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --key --custom-email-api
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand All @@ -107,7 +107,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --small-business-key --custom-email-api
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --small-business-key --custom-email-api
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --small-business-key --custom-email-api
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand Down Expand Up @@ -142,7 +142,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --advanced-key --custom-email-api
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --advanced-key --custom-email-api
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --advanced-key --custom-email-api
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand Down Expand Up @@ -185,7 +185,7 @@ Add a command-line argument: ```--repeat {number}```
python main.py --chrome --vpn-codes --custom-email-api
```
```
ESET-KeyGen_v1.5.2.5_win64.exe --chrome --vpn-codes --custom-email-api
ESET-KeyGen_v1.5.2.6_win64.exe --chrome --vpn-codes --custom-email-api
```
> File name is unique for each version! Do not copy the above command. This is an example!
Expand Down
2 changes: 1 addition & 1 deletion wiki/ResetEsetVPN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Reset ESET VPN
# Reset ESET VPN [Windows & macOS only]

---

Expand Down

0 comments on commit 19fd945

Please sign in to comment.