Skip to content

Commit

Permalink
Update to v1.4.9.1
Browse files Browse the repository at this point in the history
1. Algorithm updated due to site changes
  • Loading branch information
rzc0d3r authored May 28, 2024
1 parent 7445cff commit a3109ae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import os
import re

VERSION = ['v1.4.9.0', 1490]
VERSION = ['v1.4.9.1', 1491]
LOGO = f"""
███████╗███████╗███████╗████████╗ ██╗ ██╗███████╗██╗ ██╗ ██████╗ ███████╗███╗ ██╗
██╔════╝██╔════╝██╔════╝╚══██╔══╝ ██║ ██╔╝██╔════╝╚██╗ ██╔╝██╔════╝ ██╔════╝████╗ ██║
Expand Down
26 changes: 17 additions & 9 deletions modules/EsetTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import colorama
import platform
import time
import sys

class EsetRegister(object):
Expand Down Expand Up @@ -95,23 +96,30 @@ def sendRequestForKey(self):

console_log('Waiting for permission to request...', INFO)
uCE(self.driver, f"return {CLICK_WITH_BOOL}({GET_EBAV}('button', 'data-label', 'license-fork-slide-trial-license-card-button'))")
console_log('Access to the request was open!', OK)
try:
uCE(self.driver, f"return {CLICK_WITH_BOOL}({GET_EBAV}('ion-button', 'robot', 'license-fork-slide-continue-button'))")
uCE(self.driver, f"return {CLICK_WITH_BOOL}({GET_EBAV}('button', 'data-label', 'license-fork-slide-continue-button'))")
console_log('Access to the request was open!', OK)
except:
raise RuntimeError('Access to the request is denied, try again later!')
console_log('\nPlatforms loading...', INFO)
uCE(self.driver, f"return {CLICK_WITH_BOOL}({GET_EBAV}('button', 'data-label', 'device-protect-os-card-Windows-button'))")
console_log('Windows platform is selected!', OK)
uCE(self.driver, f"return {CLICK_WITH_BOOL}({GET_EBAV}('ion-button', 'robot', 'device-protect-choose-platform-continue-btn'))")
uCE(self.driver, f"return {CLICK_WITH_BOOL}({GET_EBAV}('button', 'data-label', 'device-protect-choose-platform-continue-btn'))")

console_log('\nSending a request for a license...', INFO)
uCE(self.driver, f"return typeof {GET_EBAV}('ion-input', 'robot', 'device-protect-get-installer-email-input') === 'object'")
exec_js(f"{GET_EBAV}('ion-input', 'robot', 'device-protect-get-installer-email-input').value = '{self.email_obj.email}'")
for _ in range(10): # Increasing the chance of getting a license, in theory
exec_js(f"{GET_EBAV}('ion-button', 'robot', 'device-protect-get-installer-send-email-btn').click()")
time.sleep(0.005)
console_log('Request successfully sent!', OK)
uCE(self.driver, f"return typeof {GET_EBID}('email') === 'object'")
exec_js(f"return {GET_EBID}('email')").send_keys(self.email_obj.email)
exec_js(f"return {GET_EBAV}('button', 'data-label', 'device-protect-get-installer-send-email-btn')").click()
for _ in range(DEFAULT_MAX_ITER):
time.sleep(0.5)
try:
btn = exec_js(f"return {GET_EBAV}('button', 'data-label', 'device-protect-get-installer-send-email-btn')")
if btn.text.lower() == 'send email':
console_log('Request successfully sent!', OK)
return True
except:
pass
raise RuntimeError('Request sending error!!!')

def getLicenseData(self):
exec_js = self.driver.execute_script
Expand Down

0 comments on commit a3109ae

Please sign in to comment.