first
This commit is contained in:
commit
c689c96419
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
||||
<h1>No-ip auto confirm</h1>
|
||||
|
||||
<h2>Auto-confirm your domain that is about to expire (30 days) every hour</h2>
|
||||
|
||||
<img src="https://media.discordapp.net/attachments/1003173519879847966/1045538344043560960/image.png">
|
78
script.py
Normal file
78
script.py
Normal file
@ -0,0 +1,78 @@
|
||||
import requests
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.chrome.options import Options
|
||||
import time
|
||||
from datetime import datetime
|
||||
import base64
|
||||
import json
|
||||
import urllib.parse
|
||||
|
||||
from selenium.webdriver.chrome.options import Options
|
||||
|
||||
def has_numbers(inputString):
|
||||
return any(char.isdigit() for char in inputString)
|
||||
|
||||
# Login credentials
|
||||
username = "" # Your noip username
|
||||
password = "" # Your noip passowrd
|
||||
|
||||
while(1):
|
||||
try:
|
||||
now = datetime.now()
|
||||
dt_string = now.strftime("%d-%m-%Y %H:%M:%S")
|
||||
|
||||
# To bypass CloudFlare's detection
|
||||
user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36'
|
||||
|
||||
|
||||
options = Options()
|
||||
options.add_argument('--headless')
|
||||
options.add_argument('--disable-gpu')
|
||||
options.add_argument('--no-sandbox') # Required if you run your script as Administrators / sudoers
|
||||
options.add_argument('--window-size=1920,1080')
|
||||
|
||||
# To bypass CloudFlare's detection
|
||||
# options.add_argument('--disable-blink-features=AutomationControlled')
|
||||
options.add_argument(f'user-agent={user_agent}')
|
||||
|
||||
browser = webdriver.Chrome(executable_path="/usr/bin/chromedriver", chrome_options=options)
|
||||
|
||||
browser.delete_all_cookies()
|
||||
browser.get("https://www.noip.com/login")
|
||||
|
||||
browser.implicitly_wait(3)
|
||||
|
||||
browser.save_screenshot('ss_noip.png')
|
||||
|
||||
browser.find_element_by_xpath("/html/body/section[3]/section/div/div/div/div/div/div[2]/form/section[1]/input").send_keys(username)
|
||||
browser.find_element_by_xpath("/html/body/section[3]/section/div/div/div/div/div/div[2]/form/section[2]/input").send_keys(password)
|
||||
browser.find_element_by_xpath("/html/body/section[3]/section/div/div/div/div/div/div[2]/form/button").click()
|
||||
|
||||
browser.get("https://my.noip.com/dynamic-dns")
|
||||
|
||||
try:
|
||||
browser.find_element_by_xpath("/html/body/div[1]/div/div/div[3]/div[1]/div[2]/div/div/div[1]/div[1]/table/tbody/tr[1]/td[5]/button[1]").click()
|
||||
except:
|
||||
print("Skip")
|
||||
try:
|
||||
browser.find_element_by_xpath("/html/body/div[1]/div/div/div[3]/div[1]/div[2]/div/div/div[1]/div[1]/table/tbody/tr[2]/td[5]/button[1]").click()
|
||||
except:
|
||||
print("Skip")
|
||||
try:
|
||||
browser.find_element_by_xpath("/html/body/div[1]/div/div/div[3]/div[1]/div[2]/div/div/div[1]/div[1]/table/tbody/tr[3]/td[5]/button[1]").click()
|
||||
except:
|
||||
print("Skip")
|
||||
|
||||
# Optional, to see the result in the form of screenshot image
|
||||
browser.save_screenshot('ss_noip.png')
|
||||
|
||||
browser.quit()
|
||||
print("Sleep for 1 hour")
|
||||
time.sleep(60*60)
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
browser.quit()
|
||||
print("Sleep for 1 hour")
|
||||
time.sleep(60*60)
|
||||
|
Loading…
Reference in New Issue
Block a user