Skip to content

Instantly share code, notes, and snippets.

@iNawaR1
Created January 4, 2022 14:11
Show Gist options
  • Save iNawaR1/00f31f77a899596ad817a948375f8f77 to your computer and use it in GitHub Desktop.
Save iNawaR1/00f31f77a899596ad817a948375f8f77 to your computer and use it in GitHub Desktop.
API user checker for connect2 app. Note You need user.txt file !!
import requests
import time
iNaWaR = 'user.txt'
file = open(iNaWaR, 'r')
ID_tele=input("[?] id Telegram : ")
token_bot=input("[?] bot Token : ")
head ={
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.9',
'cache-control': 'max-age=0',
'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="96", "Microsoft Edge";v="96"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'document',
'sec-fetch-mode': 'navigate',
'sec-fetch-site': 'none',
'sec-fetch-user': '?1',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62',
}
while True :
user = file.readline().split('\n')[0]
if user == '':
break
check = f'https://apis.red/api/connected2/?user={user}'
rq = requests.get(check, headers=head)
time.sleep(0)
if 'Valid' in rq.text:
print('[+] Available -->> {}'.format(user))
tele = (
f'https://api.telegram.org/bot{token_bot}/sendMessage?chat_id={ID_tele}&text=\n𖡃 𝚄𝚂𝙴𝚁: {user}\n\n @iNaWaR1 New Hunt ')
re = requests.post(tele)
with open('Available.txt', 'a') as x:
tl = 'Available USER --> '
x.write(tl + user + '\n')
elif 'Taken' in rq.text:
print(f'[-] user not available -->> @{user}')
elif 'User Is Under 4 Chars!' in rq.text:
print(f" User under 4 chars !!! -->> {user}")
else:
print(f'Error')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment