Skip to content

Commit

Permalink
Merge pull request #64 from ray1025/patch-1
Browse files Browse the repository at this point in the history
Fix 2FA changed form
  • Loading branch information
neothematrix authored May 20, 2024
2 parents 1a4d23d + 897fff3 commit ecfb8c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions noip-renew.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
Expand Down Expand Up @@ -111,9 +112,9 @@ def login(self):
self.logger.log("Sending OTP...")

ele_challenge = elem.find_element(By.NAME, "challenge_code")

ele_challenge.send_keys(TOTP(self.totp_secret).now())
ele_challenge.send_keys(Keys.ENTER)
self.browser.execute_script("arguments[0].focus();", ele_challenge)
ActionChains(self.browser).send_keys(TOTP(self.totp_secret).now()).perform()
ActionChains(self.browser).send_keys(Keys.ENTER).perform()

# After Loggin browser loads my.noip.com page - give him some time to load
# 'noip-cart' element is near the end of html, so html have been loaded
Expand Down

0 comments on commit ecfb8c7

Please sign in to comment.