From 963d9f878107c2496eb77a8124ff62d38564dafc Mon Sep 17 00:00:00 2001 From: fruitberry <50817549+fruitberry@users.noreply.github.com> Date: Mon, 10 Jun 2019 07:38:30 -0700 Subject: update project --- project/url-checkback-script.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 project/url-checkback-script.py (limited to 'project/url-checkback-script.py') diff --git a/project/url-checkback-script.py b/project/url-checkback-script.py new file mode 100644 index 0000000..45861fa --- /dev/null +++ b/project/url-checkback-script.py @@ -0,0 +1,38 @@ +import time +import webbrowser +from selenium import webdriver +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.support.ui import WebDriverWait +from tkinter import * +from tkinter.filedialog import askopenfile + +print (">>> URL Check-Back Tool <<< ") +print (">>> Made by Zoltan | fruitberry <<< ") + + +driver = webdriver.Chrome("C:/chromedriver.exe"); +xPath = """//*[@id="app-mount"]/div[1]/div/div[2]/div/section/div/div[1]""" +count = 0 +might = 0 +attempts = 0 + +file = askopenfile(filetypes=[("Text files","*.txt")]) +codes = file.readlines() + +for code in codes: + print(attempts) + attempts += 1 + driver.get("http://discord.gift/" + code) + time.sleep(2) + try: + texter = driver.find_element_by_xpath(xPath) + except NoSuchElementException: + print ("Might be Valid \n \n \n \n %s - @fruitberry - \n \n \n \n" % code) + might += 1 + continue + if(texter.text == "Gift Code Invalid"): + print("Might: %d | Invalid: %d" % (might, attempts)) +time.sleep(3); +print("\n\tMight: %d \n\t Invalids: %d" % (might, attempts)) +driver.close() +input('Finished') -- cgit v1.2.3