diff --git a/src/codeparts/systems.py b/src/codeparts/systems.py index 124ad25..6b40be5 100644 --- a/src/codeparts/systems.py +++ b/src/codeparts/systems.py @@ -192,11 +192,14 @@ def load_proxy(self): return self.proxylist def getproxy(self,proxlist): - if proxlist == None: - return None - if len(proxlist) <= 1: - return None - nextproxy=random.choice(proxlist) + try: + if proxlist == None: + return None + if len(proxlist) <= 1: + return None + nextproxy=random.choice(proxlist) + except: + nextproxy=None return nextproxy def center(self,var:str, space:int=None): # From Pycenter @@ -204,4 +207,25 @@ def center(self,var:str, space:int=None): # From Pycenter space = (os.get_terminal_size().columns - len(var.splitlines()[int(len(var.splitlines())/2)])) / 2 return "\n".join((' ' * int(space)) + var for var in var.splitlines()) + def checkproxy(self): + session=requests.Session() + try: + with open(f"{self.parentpath}\\proxy.txt", "r") as f: + proxylist = f.readlines() + except FileNotFoundError: + input('cant find your proxy file. press enter to return') + for proxy in proxylist: + proxy=proxy.replace('\n','') + proxxy={ + 'http':f'http://{proxy}', + 'https':f'http://{proxy}', + } + print(f'using: {proxxy}') + try: + resp=session.get('https://api.myip.com/',proxies=proxxy).text + except: + resp='bad response. delete this proxy' + print(f'response: {resp}\n') + input('press enter to return') + syss=system() diff --git a/src/codeparts/validsort.py b/src/codeparts/validsort.py index 26a578e..4e1d76a 100644 --- a/src/codeparts/validsort.py +++ b/src/codeparts/validsort.py @@ -78,6 +78,8 @@ def customsort(self): rp=str(input('enter how many RP should this account have ("1000" will search all accounts with RP amount 1000 or higher) >>>')) + skin=str(input('enter what skin should be in this accounts (for example, prime vandal) >>>')) + mail = inquirer.select( message="unverified mail:", choices=mails, @@ -173,11 +175,11 @@ def customsort(self): rpacc=1 if rpacc>=rpam or rp =='': if f'unverifiedmail-> {mail}' in account: - #print(True) - with open(f'{self.parentpath}/output/sorted.txt','a',encoding='UTF-8') as f: - f.write(account+'###account###') - matches+=1 - print(f'sorted {sorted}/{count} MATCH') + if skin in account: + with open(f'{self.parentpath}/output/sorted.txt','a',encoding='UTF-8') as f: + f.write(account+'###account###') + matches+=1 + print(f'sorted {sorted}/{count} MATCH') except Exception as e: pass print(f'sorted {sorted}/{count}') diff --git a/src/main.py b/src/main.py index 070df22..d28b432 100644 --- a/src/main.py +++ b/src/main.py @@ -20,7 +20,7 @@ class program(): def __init__(self) -> None: self.count=0 self.checked=0 - self.version='3.5.4' + self.version='3.5.5' self.riotlimitinarow=0 try: self.lastver=requests.get('https://lil-jaba.github.io/valchecker/src/system/lastver.html').text.replace(' ','').replace('\n','') @@ -59,6 +59,7 @@ def start(self): 'Start Checker', 'Edit Settings', 'Sort Valid', + 'Test Proxy', 'Info/Help', Separator(), 'Exit' @@ -79,6 +80,8 @@ def start(self): valid.customsort() input('done. press ENTER to exit') elif res==menu_choices[4]: + sys.checkproxy() + elif res==menu_choices[5]: os.system('cls') print(f''' valchecker v{self.version} by liljaba1337 @@ -89,12 +92,13 @@ def start(self): [1] - check valid/invalid/ban and save them to valid.txt in output folder [2] - i think u understand [3] - sorts all accounts from valid.txt which match your requirements to output\\sorted\\custom.txt + [4] - test your proxies [~] - press ENTER to return ''') input() continue - elif res==menu_choices[6]: + elif res==menu_choices[7]: os._exit(0) diff --git a/src/system/lastver.html b/src/system/lastver.html index e5b8a84..1947319 100644 --- a/src/system/lastver.html +++ b/src/system/lastver.html @@ -1 +1 @@ -3.5.4 \ No newline at end of file +3.5.5 \ No newline at end of file