From 7a2bcb559e6ce005d6871ae402045637bf55a1a8 Mon Sep 17 00:00:00 2001 From: LIL-JABA Date: Wed, 14 Sep 2022 11:44:36 +0300 Subject: [PATCH] v3.6.7 some improvements in speed and GUI --- src/checker.py | 45 +++++++++++++++++++++++++++++++++++----- src/codeparts/auth.py | 16 ++++++++++++-- src/codeparts/systems.py | 12 ++++++++++- src/main.py | 14 +++++++------ src/system/lastver.html | 1 - 5 files changed, 73 insertions(+), 15 deletions(-) delete mode 100644 src/system/lastver.html diff --git a/src/checker.py b/src/checker.py index 26208ca..4ca7ebf 100644 --- a/src/checker.py +++ b/src/checker.py @@ -9,6 +9,7 @@ import threading from InquirerPy import inquirer from InquirerPy.separator import Separator +import json from colorama import Fore, Style @@ -38,6 +39,14 @@ def __init__(self,settings:list,proxylist) -> None: self.webhook='' else: pass + + #try: + # from pypresence import Presence + # from pypresence.exceptions import DiscordNotFound, InvalidID + # self.rpc = Presence("1019363739859963915") + # self.rpc.connect() + #except ModuleNotFoundError: + # pass path = os.getcwd() self.parentpath=os.path.abspath(os.path.join(path, os.pardir)) @@ -79,7 +88,7 @@ def main(self,accounts,count): self.whtext=f'{Fore.LIGHTGREEN_EX}Using the webhook{Fore.RESET}' self.count=count os.system(f'mode con: cols=150 lines=32') - self.threadam=int(input('input number if threads (min 1 max 1000) >>>')) + self.threadam=int(input(f'input number if threads (min 1 max 1000) (proxies: {self.proxycount}) >>>')) self.threadam= self.threadam if 1000>self.threadam>0 else self.proxycount if self.proxycount > 1 else 3 menu_choices=[ Separator(), @@ -138,6 +147,7 @@ def main(self,accounts,count): # print("Checked all") def checker(self,username,password): + riotlimitinarow=0 proxy=sys.getproxy(self.proxylist) account=f'{username}:{password}' reset = Fore.RESET @@ -165,23 +175,25 @@ def checker(self,username,password): f.write(f'({datetime.datetime.now()}) {mailverif}\n_________________________________\n') self.err+=1 elif token==1: - if self.riotlimitinarowprevcpm else f'↓ {self.cpm}' + #elif finishedtesting-self.startedtesting>10000: + # try: + # self.rpc.update( + # details=f'Checking {self.checked}/{self.count} accounts', + # state=f"{self.valid} valid ({str(round(self.valid/self.checked*100 if self.checked !=0 else 0,1))}%)", + # #large_image=mapImage, + # #large_text=mapText, + # #small_image=agent_img, + # #small_text=agent, + # buttons=[{"label": "What's this? 👀", "url": "https://github.com/LIL-JABA/valchecker"}] + # ) + # except: + # pass reset = Fore.RESET cyan = Fore.CYAN diff --git a/src/codeparts/auth.py b/src/codeparts/auth.py index 10ad846..043d813 100644 --- a/src/codeparts/auth.py +++ b/src/codeparts/auth.py @@ -1,11 +1,15 @@ from collections import OrderedDict from re import compile +import re from ssl import PROTOCOL_TLSv1_2 from tkinter import * import traceback import pandas +import urllib3.exceptions +import http,http.client -from requests import session as sesh +from requests import session as sesh,exceptions +import requests from requests.adapters import HTTPAdapter from urllib3 import PoolManager @@ -58,7 +62,15 @@ def auth(self,logpass=None,username=None,password=None,proxy=None): } r2 = session.put('https://auth.riotgames.com/api/v1/authorization', json=data, headers=headers,proxies=proxy) #input(r2.text) - except: + except requests.exceptions.ConnectTimeout: + return 6,6,6,True,None + except requests.exceptions.ProxyError: + return 6,6,6,True,None + except urllib3.exceptions.MaxRetryError: + return 6,6,6,True,None + except http.client.RemoteDisconnected: + return 6,6,6,True,None + except Exception as e: return 6,6,6,6,None #print(r2.text) try: diff --git a/src/codeparts/systems.py b/src/codeparts/systems.py index de4cd50..f65ebb2 100644 --- a/src/codeparts/systems.py +++ b/src/codeparts/systems.py @@ -6,9 +6,12 @@ from colorama import Fore,Back import requests +from requests import exceptions import valo_api as vapi from InquirerPy import inquirer from InquirerPy.separator import Separator +import traceback +import ctypes from codeparts import checkers from codeparts.data import Constants @@ -218,7 +221,7 @@ def getproxy(self,proxlist): nextproxy=proxlist[self.num] self.num+=1 except Exception as e: - input(e) + #input(e) nextproxy=None return nextproxy @@ -238,6 +241,9 @@ def checkproxy(self): except FileNotFoundError: input('cant find your proxy file. press enter to return') good=[] + count=len(proxylist) + checked=0 + goodc,bad=0,0 for proxy in proxylist: proxy=proxy.replace('\n','') proxxy={ @@ -249,9 +255,13 @@ def checkproxy(self): resp=session.get('https://auth.riotgames.com/api/v1/authorization/',proxies=proxxy).text resp=f'{Fore.GREEN}[Good]{Fore.RESET} {proxy}' good.append(proxy) + goodc+=1 except Exception as e: resp=f'{Fore.RED}[Bad]{Fore.RESET} {proxy} ({e})' + bad+=1 print(f'{resp}') + checked+=1 + ctypes.windll.kernel32.SetConsoleTitleW(f'ValChecker by liljaba1337 | Checking Proxies ({checked}/{count}) | Good {goodc} | Bad {bad}') if inquirer.confirm( message="Do you want to delete the bad ones?", default=True ).execute(): diff --git a/src/main.py b/src/main.py index 2a4dba2..e91c078 100644 --- a/src/main.py +++ b/src/main.py @@ -21,14 +21,15 @@ class program(): def __init__(self) -> None: self.count=0 self.checked=0 - self.version='3.6.6' + self.version='3.6.7' self.riotlimitinarow=0 try: - self.lastver=requests.get('https://lil-jaba.github.io/valchecker/src/system/lastver.html').text.replace(' ','').replace('\n','') - if 'a' in self.lastver: - self.lastver=self.version + response=requests.get('https://api.github.com/repos/lil-jaba/valchecker/releases').json() + self.lastver=response[0]['tag_name'] + self.changelog=response[0]['body'] except: self.lastver=self.version + self.changelog='' def start(self): while True: @@ -55,7 +56,8 @@ def start(self): ''')) print(sys.center(f'v{self.version}{secret}')) if self.lastver!=self.version: - print(sys.center(f'new update ({self.lastver}) is available!')) + print(sys.center(f'\nnew update ({self.lastver}) is available!')) + print(sys.center(f'What\'s new: {self.changelog}')) menu_choices=[ Separator(), 'Start Checker', @@ -71,7 +73,7 @@ def start(self): message="Please select an option:", choices=menu_choices, default=menu_choices[0], - pointer='>' + pointer='>', ).execute() if res==menu_choices[1]: self.main(redirect=True) diff --git a/src/system/lastver.html b/src/system/lastver.html deleted file mode 100644 index 813ed36..0000000 --- a/src/system/lastver.html +++ /dev/null @@ -1 +0,0 @@ -3.6.6 \ No newline at end of file