Skip to content

Commit

Permalink
Update to v1.0.9.1 (171123-1541)
Browse files Browse the repository at this point in the history
1. New algorithm for generating keys in connection with site updates
2. Disabled stacktrace output
  • Loading branch information
rzc0d3r committed Nov 17, 2023
1 parent d2d3e57 commit da9b8d0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.0.0 (191023-2057)
# v1.0.1 (171123-1541)
import modules.chrome_driver_installer as chrome_driver_installer
import modules.logger as logger

Expand Down Expand Up @@ -92,5 +92,9 @@ def chrome_driver_installer_menu(): # auto updating or installing chrome driver
f.close()
driver.quit()
except Exception as E:
logger.console_log(str(E), logger.ERROR)
info = str(E)
if str(type(E)).find('selenium') and info.find('Stacktrace:') != -1: # disabling stacktrace output
logger.console_log(info.split('Stacktrace:', 1)[0], logger.ERROR)
else:
logger.console_log(str(E), logger.ERROR)
input('Press Enter...')
35 changes: 20 additions & 15 deletions modules/eset_keygen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# v1.0.9 (191023-2057)
VERSION = 'v1.0.9 (191023-2057) by rzc0d3r'
# v1.0.9.1 (171123-1541)
VERSION = 'v1.0.9.1 (171123-1541) by rzc0d3r'
import modules.logger as logger
import modules.shared_tools as shared_tools

Expand All @@ -12,19 +12,24 @@ def __init__(self, registered_email_obj, driver):
self.driver = driver

def sendRequestForKey(self):
logger.console_log('\nLicense page loading...', logger.INFO)
self.driver.get("https://home.eset.com/licenses")
logger.console_log('\nHome page loading...', logger.INFO)
self.driver.get("https://home.eset.com/")
shared_tools.untilConditionExecute(self.driver, f"return {shared_tools.GET_EBCN}('ion-cui-button ios button button-solid ion-activatable ion-focusable hydrated').length > 1")
logger.console_log('License page is loaded!', logger.OK)
logger.console_log('Home page is loaded!', logger.OK)

logger.console_log('\nRequest sending...', logger.INFO)
self.driver.execute_script(f"{shared_tools.GET_EBCN}('ion-cui-button ios button button-solid ion-activatable ion-focusable hydrated')[1].click()")

logger.console_log('Waiting for permission to request...', logger.INFO)
shared_tools.untilConditionExecute(self.driver, f"return {shared_tools.GET_EBCN}('ion-cui-button ios button button-clear ion-activatable ion-focusable hydrated').length > 10")
self.driver.execute_script(f"{shared_tools.GET_EBCN}('ion-cui-button ios button button-clear ion-activatable ion-focusable hydrated')[10].click()")
shared_tools.untilConditionExecute(self.driver, f"return {shared_tools.GET_EBCN}('ion-cui-card LabeledCard ios hydrated').length > 2")
logger.console_log('Access to the request was open!', logger.OK)

js = [
f"{shared_tools.GET_EBCN}('ion-cui-card LabeledCard ios hydrated')[2].click()",
f"{shared_tools.GET_EBCN}('ion-cui-button ios button button-solid ion-activatable ion-focusable hydrated')[2].click()"
]
self.driver.execute_script('\n'.join(js))

logger.console_log('\nPlatforms loading...', logger.INFO)
shared_tools.untilConditionExecute(self.driver, f"return {shared_tools.GET_EBCN}('ion-cui-card device-protect-os-card ios hydrated').length > 1")
self.driver.execute_script(f"{shared_tools.GET_EBCN}('ion-cui-card device-protect-os-card ios hydrated')[1].click()")
Expand All @@ -36,28 +41,28 @@ def sendRequestForKey(self):
shared_tools.untilConditionExecute(self.driver, f"return typeof {shared_tools.GET_EBCN}('sc-ion-input-ios-h sc-ion-input-ios-s ios hydrated')[0] === 'object'")
logger.console_log('Sending a request for a license...', logger.INFO)
self.driver.execute_script(f"{shared_tools.GET_EBCN}('sc-ion-input-ios-h sc-ion-input-ios-s ios hydrated')[0].value = '{self.email_obj.get_full_login()}'")
self.driver.execute_script(f"{shared_tools.GET_EBCN}('ion-cui-button ios button button-solid ion-activatable ion-focusable hydrated')[1].click()")
self.driver.execute_script(f"{shared_tools.GET_EBCN}('ion-cui-button ios button button-solid ion-activatable ion-focusable hydrated')[2].click()")
logger.console_log('Waiting for confirmation of request...', logger.INFO)

shared_tools.untilConditionExecute(self.driver, f"return typeof {shared_tools.GET_EBCN}('ProtectionSuccess')[0] === 'object'")
shared_tools.untilConditionExecute(self.driver, f"return {shared_tools.GET_EBCN}('protect-sent-installer-modal--content').length > 0")
logger.console_log('Request was approved!', logger.OK)

def getLicenseData(self):
try: # Old method (V1)
logger.console_log('\n[V1] License uploads...', logger.INFO)
self.driver.get("https://home.eset.com/licenses")
self.driver.get("https://home.eset.com/subscriptions")
shared_tools.untilConditionExecute(self.driver, f"return {shared_tools.GET_EBCN}('ion-cui-button license-preview_link-btn ios button button-block button-solid ion-activatable ion-focusable hydrated').length > 0", max_iter=20)

license_tag = self.driver.execute_script(f"return {shared_tools.GET_EBCN}('ion-cui-button license-preview_link-btn ios button button-block button-solid ion-activatable ion-focusable hydrated')[0].href")
logger.console_log('[V1] License is uploaded!', logger.OK)
self.driver.get(f"https://home.eset.com{license_tag}")

logger.console_log('\n[V1] Getting information from the license...', logger.INFO)
shared_tools.untilConditionExecute(self.driver, f"return {shared_tools.GET_EBCN}('DetailInfoSectionItem__value').length > 15")
shared_tools.untilConditionExecute(self.driver, f"return {shared_tools.GET_EBCN}('ion-color ion-color-dark md hydrated').length > 20")

license_name = self.driver.execute_script(f"return {shared_tools.GET_EBCN}('DetailInfoSectionItem__value')[0].textContent")
license_out_date = self.driver.execute_script(f"return {shared_tools.GET_EBCN}('DetailInfoSectionItem__value')[2].textContent")
license_key = self.driver.execute_script(f"return {shared_tools.GET_EBCN}('DetailInfoSectionItem__value')[4].textContent")
license_name = self.driver.execute_script(f"return {shared_tools.GET_EBCN}('ion-color ion-color-dark md hydrated')[10].innerText")
license_out_date = self.driver.execute_script(f"return {shared_tools.GET_EBCN}('ion-color ion-color-dark md hydrated')[12].innerText")
license_key = self.driver.execute_script(f"return {shared_tools.GET_EBCN}('ion-color ion-color-dark md hydrated')[14].innerText")
logger.console_log('[V1] Information successfully received!', logger.OK)
return license_name, license_out_date, license_key
except: # New method (V2)
Expand Down

0 comments on commit da9b8d0

Please sign in to comment.