def useConfig(self): global REGION, paydetails correctPass = False if len(self.ui.password.text()) > 0: selected_file = self.ui.conf_file.currentText() enc.password = self.ui.password.text().encode('utf-8') for x in paydetails: paydetails[x] = enc.readConf(x, selected_file) for x in paydetails: if paydetails[x] == "": correctPass = False else: correctPass = True if correctPass: print("Successfully Loaded: " + selected_file) self.ui.status.setStyleSheet('color: GREEN') self.updateStatus('Correct Password') itemSelection() else: print("Empty Values detected, assuming wrong password.") self.ui.status.setStyleSheet('color: RED') self.updateStatus('Wrong Password') else: self.updateStatus('No password specified') return None
def main(): global service, capabilities, password, items, reg, pDescr wsh = comclt.Dispatch("WScript.Shell") chromePath = readPath() service = service.Service(getLoc('chromedriver.exe')) capabilities = {'chrome.binary': chromePath} print("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-") print( "Thanks for using our bot. Please note this bot is experimental and in a very early development stage." ) print( "This bot is simply a script. By deciding to use this bot you are responsible for any purchases. Not us." ) print( "PLEASE ENTER THE CORRECT PATH TO YOUR CHROME.EXE IN THE 'chromepath.txt' FILE" ) print("Read the README.md file carefully before use") print("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-") print( "\nFill out all the details, make sure you get all of them right. If you need help please open 'README.md' or check the reddit post." ) reg = getRegion() if reg == 'EU': pDescr = EUpDescr elif reg == 'US': pDescr = USpDescr elif reg == 'ASIA': pDescr = ASIApDescr if not isPasswordExists(): enc.paydetails = paydetails enc.initConf() getPDetails() else: inp = input('Do you want to use your stored details? [Y]es/[N]o: ') enc.update(paydetails) if inp.upper() == 'YES' or inp.upper() == 'Y': inp = input('Enter your password: '******'ascii') for x in paydetails: paydetails[x] = enc.readConf(x) else: getPDetails() if not confirmPayDetails(): getPDetails() selectItemNum() items = [] for x in range(itemNum): getItemDetails() openChrome() cart()
def passwordEntered(self, password): if not self.enterPass.isEnabled() == False: enc.password = password.encode('ascii') for x in paydetails: paydetails[x] = enc.readConf(x) self.populateFromSave(paydetails["Region"])
def readProduct(driver, password): input("Fill out the details and click the button when finished. Then, press enter to continue.") sdrop = readDetailsFromList(driver, """//*[@id="drop_time"]""") scatType = readDetailsFromList(driver, """//*[@id="category_type"]""") scolour = readDetailsFromList(driver, """//*[@id="colour"]""") skeywords = readDetailsFromList(driver, """//*[@id="order_keywords"]""") ssize = readDetailsFromList(driver, """//*[@id="size"]""") sname = enc.readConf('Name', password) semail = enc.readConf('Email', password) stel = enc.readConf('Phone', password) sadd1 = enc.readConf('Addr1', password) sadd2 = enc.readConf('Addr2', password) sadd3 = enc.readConf('Addr3', password) scity = enc.readConf('City', password) spostcode = enc.readConf('Post/zip code', password) scountry = enc.readConf('Country', password) scard = enc.readConf('CardType', password) scardno = enc.readConf('Cardno', password) smonth = enc.readConf('CardMonth', password) syear = enc.readConf('CardYear', password) scvv = enc.readConf('CardCVV', password) purchaseItem(driver, sname, semail, stel, sadd1, sadd2, sadd3, scity, spostcode, scountry, scard, scardno, smonth, syear, sdrop, scatType, scolour, skeywords, ssize, scvv)