diff --git a/main.py b/main.py index 01a8e68634..90becd2e46 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,7 @@ from modules.EmailAPIs import * # ---- Quick settings [for Developers to quickly change behavior without changing all files] ---- -VERSION = ['v1.5.3.3', 1533] +VERSION = ['v1.5.3.4', 1534] LOGO = f""" ███████╗███████╗███████╗████████╗ ██╗ ██╗███████╗██╗ ██╗ ██████╗ ███████╗███╗ ██╗ ██╔════╝██╔════╝██╔════╝╚══██╔══╝ ██║ ██╔╝██╔════╝╚██╗ ██╔╝██╔════╝ ██╔════╝████╗ ██║ @@ -68,7 +68,6 @@ from modules.WebDriverInstaller import * -# Bypassing ESET antivirus detection from modules.EsetTools import EsetRegister as ER from modules.EsetTools import EsetKeygen as EK from modules.EsetTools import EsetVPN as EV @@ -375,19 +374,19 @@ def main(disable_exit=False): console_log('Invalid email syntax!!!', ERROR) if email_obj.email is not None: - eset_password = dataGenerator(10) - license_key = None + e_passwd = dataGenerator(10) + l_key = None obtained_from_site = False # ESET HOME if args['account'] or args['key'] or args['small_business_key'] or args['vpn_codes']: - ER_obj = ER(email_obj, eset_password, driver) + ER_obj = ER(email_obj, e_passwd, driver) ER_obj.createAccount() ER_obj.confirmAccount() output_line = '\n'.join([ '', '-------------------------------------------------', f'Account Email: {email_obj.email}', - f'Account Password: {eset_password}', + f'Account Password: {e_passwd}', '-------------------------------------------------', '' ]) @@ -396,16 +395,16 @@ def main(disable_exit=False): output_filename = 'ESET KEYS.txt' EK_obj = EK(email_obj, driver, 'ESET HOME' if args['key'] else 'SMALL BUSINESS') EK_obj.sendRequestForKey() - license_name, license_key, license_out_date = EK_obj.getLicenseData() + l_name, l_key, l_out_date = EK_obj.getLD() output_line = '\n'.join([ '', '-------------------------------------------------', f'Account Email: {email_obj.email}', - f'Account Password: {eset_password}', + f'Account Password: {e_passwd}', '', - f'License Name: {license_name}', - f'License Key: {license_key}', - f'License Out Date: {license_out_date}', + f'License Name: {l_name}', + f'License Key: {l_key}', + f'License Out Date: {l_out_date}', '-------------------------------------------------', '' ]) @@ -419,11 +418,11 @@ def main(disable_exit=False): '', '-------------------------------------------------', f'Account Email: {email_obj.email}', - f'Account Password: {eset_password}', + f'Account Password: {e_passwd}', '', - f'License Name: {license_name}', - f'License Key: {license_key}', - f'License Out Date: {license_out_date}', + f'License Name: {l_name}', + f'License Key: {l_key}', + f'License Out Date: {l_out_date}', '', f'VPN Codes: {vpn_codes_line}', '-------------------------------------------------', @@ -432,7 +431,7 @@ def main(disable_exit=False): # ESET ProtectHub elif args['protecthub_account'] or args['advanced_key']: - EPHR_obj = EPHR(email_obj, eset_password, driver) + EPHR_obj = EPHR(email_obj, e_passwd, driver) EPHR_obj.createAccount() EPHR_obj.confirmAccount() EPHR_obj.activateAccount() @@ -440,25 +439,25 @@ def main(disable_exit=False): '', '---------------------------------------------------------------------', f'ESET ProtectHub Account Email: {email_obj.email}', - f'ESET ProtectHub Account Password: {eset_password}', + f'ESET ProtectHub Account Password: {e_passwd}', '---------------------------------------------------------------------', '' ]) output_filename = 'ESET ACCOUNTS.txt' if args['advanced_key']: output_filename = 'ESET KEYS.txt' - EPHK_obj = EPHK(email_obj, eset_password, driver) - license_name, license_key, license_out_date, obtained_from_site = EPHK_obj.getLicenseData() - if license_name is not None: + EPHK_obj = EPHK(email_obj, e_passwd, driver) + l_name, l_key, l_out_date, obtained_from_site = EPHK_obj.getLD() + if l_name is not None: output_line = '\n'.join([ '', '---------------------------------------------------------------------', f'ESET ProtectHub Account Email: {email_obj.email}', - f'ESET ProtectHub Account Password: {eset_password}', + f'ESET ProtectHub Account Password: {e_passwd}', '', - f'License Name: {license_name}', - f'License Key: {license_key}', - f'License Out Date: {license_out_date}', + f'License Name: {l_name}', + f'License Key: {l_key}', + f'License Out Date: {l_out_date}', '---------------------------------------------------------------------', '' ]) @@ -471,7 +470,7 @@ def main(disable_exit=False): f.write(output_line) f.close() - if license_key is not None and args['advanced_key'] and obtained_from_site: + if l_key is not None and args['advanced_key'] and obtained_from_site: unbind_key = input(f'[ {colorama.Fore.YELLOW}INPT{colorama.Fore.RESET} ] {colorama.Fore.CYAN}Do you want to unbind the key from this account? (y/n): {colorama.Fore.RESET}').strip().lower() if unbind_key == 'y': EPHK_obj.removeLicense() diff --git a/modules/EsetTools.py b/modules/EsetTools.py index de44ad5e95..dbb8ce442b 100644 --- a/modules/EsetTools.py +++ b/modules/EsetTools.py @@ -126,7 +126,7 @@ def sendRequestForKey(self): except: raise RuntimeError('Request sending error!!!') - def getLicenseData(self): + def getLD(self): exec_js = self.driver.execute_script uCE = untilConditionExecute console_log('\nLicense uploads...', INFO) @@ -278,7 +278,7 @@ def __init__(self, registered_email_obj: OneSecEmailAPI, eset_password: str, dri self.eset_password = eset_password self.driver = driver - def getLicenseData(self): + def getLD(self): exec_js = self.driver.execute_script uCE = untilConditionExecute diff --git a/modules/Updater.py b/modules/Updater.py index b182395ee3..cd9ec0ef06 100644 --- a/modules/Updater.py +++ b/modules/Updater.py @@ -66,9 +66,9 @@ def __init__(self, disable_logging=False): self.releases = None def get_releases(self, version='latest'): - url = 'https://api.github.com/repos/rzc0d3r/ESET-KeyGen/releases' + url = 'https://api.github.com/repos/shadowcopyrz/ESET-KGEN-COPY/releases' if version == 'latest': - url = 'https://api.github.com/repos/rzc0d3r/ESET-KeyGen/releases/latest' + url = 'https://api.github.com/repos/shadowcopyrz/ESET-KGEN-COPY/releases/latest' try: response = requests.get(url, timeout=5) update_json = response.json() @@ -85,11 +85,14 @@ def get_releases(self, version='latest'): f_update_json[release['name']] = { 'version': release['name'], 'src': release['zipball_url'], - 'assets': {}, - 'changelog': release['body'].strip() + 'assets': {} } for asset in release['assets']: - f_update_json[release['name']]['assets'][asset['name']] = asset['browser_download_url'] + if asset['name'] == 'src.zip': + f_update_json[release['name']]['src'] = asset['browser_download_url'] + else: + f_update_json[release['name']]['assets'][asset['name']] = asset['browser_download_url'] + self.releases = f_update_json return f_update_json except: return None @@ -156,10 +159,8 @@ def extract_data(self, data_path: str, new_name=None): os.rename(extracted_folder_name, new_name) extracted_data_path = str(pathlib.Path(new_name).resolve()) else: - # rzc0d3r-ESET-KeyGen-v1.5.2.7-0-g344f0d9.zip -> v1.5.2.7 - # rzc0d3r-ESET-KeyGen-56a2c5b -> ESET-KeyGen-v1.5.2.7 - os.rename(extracted_folder_name, 'ESET-KeyGen-'+pathlib.Path(data_path).name.split('-')[3]) - extracted_data_path = str(pathlib.Path('ESET-KeyGen-'+pathlib.Path(data_path).name.split('-')[3]).resolve()) + os.rename(extracted_folder_name, 'ESET-KeyGen-'+list(self.releases.keys())[0]) + extracted_data_path = str(pathlib.Path('ESET-KeyGen-'+list(self.releases.keys())[0])) except Exception as e: if not self.disable_logging: console_log(str(e), ERROR)