Skip to content

Commit

Permalink
Update to v1.5.2.4
Browse files Browse the repository at this point in the history
1. Algorithm changes due to updates on the site
  • Loading branch information
rzc0d3r authored Nov 5, 2024
1 parent 529e32e commit ea8f53b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion 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.3', 1523]
VERSION = ['v1.5.2.4', 1524]
LOGO = f"""
███████╗███████╗███████╗████████╗ ██╗ ██╗███████╗██╗ ██╗ ██████╗ ███████╗███╗ ██╗
██╔════╝██╔════╝██╔════╝╚══██╔══╝ ██║ ██╔╝██╔════╝╚██╗ ██╔╝██╔════╝ ██╔════╝████╗ ██║
Expand Down
31 changes: 18 additions & 13 deletions modules/EsetTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ def getLicenseData(self):
uCE(self.driver, f"return {GET_EBAV}('div', 'class', 'LicenseDetailInfo') != null")
if self.driver.current_url.find('detail') != -1:
console_log(f'License ID: {self.driver.current_url[-11:]}', OK)
uCE(self.driver, f"return {GET_EBAV}('div', 'data-r', 'license-detail-product-name') != null", max_iter=10)
uCE(self.driver, f"return {GET_EBAV}('div', 'data-r', 'license-detail-license-model-additional-info') != null", max_iter=10)
uCE(self.driver, f"return {GET_EBAV}('div', 'data-r', 'license-detail-license-key') != null", max_iter=10)
license_name = exec_js(f"return {GET_EBAV}('div', 'data-r', 'license-detail-product-name').innerText")
license_out_date = exec_js(f"return {GET_EBAV}('div', 'data-r', 'license-detail-license-model-additional-info').innerText")
license_key = exec_js(f"return {GET_EBAV}('div', 'data-r', 'license-detail-license-key').innerText")
uCE(self.driver, f"return {GET_EBAV}('div', 'data-label', 'license-detail-product-name') != null", max_iter=10)
uCE(self.driver, f"return {GET_EBAV}('div', 'data-label', 'license-detail-license-model-additional-info') != null", max_iter=10)
uCE(self.driver, f"return {GET_EBAV}('div', 'data-label', 'license-detail-license-key') != null", max_iter=10)
license_name = exec_js(f"return {GET_EBAV}('div', 'data-label', 'license-detail-product-name').innerText")
license_out_date = exec_js(f"return {GET_EBAV}('div', 'data-label', 'license-detail-license-model-additional-info').innerText")
license_key = exec_js(f"return {GET_EBAV}('div', 'data-label', 'license-detail-license-key').innerText")
console_log('Information successfully received!', OK)
return license_name, license_key, license_out_date

Expand Down Expand Up @@ -351,13 +351,18 @@ def getLicenseData(self):
exec_js(f'return {GET_EBID}("show-license-key-auth-modal-authenticate")').click()
except:
pass
time.sleep(5)
uCE(self.driver, f'return {GET_EBAV}("div", "data-label", "license-overview-key-value") != null')
license_key = exec_js(f'return {GET_EBAV}("div", "data-label", "license-overview-key-value").children[0].textContent').split(' ')[0].strip()
console_log('Information successfully received!', OK)
return license_name, license_key, license_out_date
except:
pass
for _ in range(DEFAULT_MAX_ITER):
try:
license_key = exec_js(f'return {GET_EBAV}("div", "data-label", "license-overview-key-value").children[0].textContent.trim()')
if license_key is not None and not license_key.startswith('XXXX-XXXX-XXXX-XXXX-XXXX'): # ignoring XXXX-XXXX-XXXX-XXXX-XXXX
license_key = license_key.split(' ')[0]
console_log('Information successfully received!', OK)
return license_name, license_key, license_out_date
except:
pass
time.sleep(DEFAULT_DELAY)
except Exception as E:
console_log('Error when obtaining a license key from the site!!!', ERROR)
# Obtaining license data from the email
console_log('\n[Email] License uploads...', INFO)
if self.email_obj.class_name == 'custom':
Expand Down

0 comments on commit ea8f53b

Please sign in to comment.