This repository has been archived by the owner on Dec 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.py
93 lines (83 loc) · 3.04 KB
/
check.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import time
from urllib.request import Request, urlopen
from bs4 import BeautifulSoup
from art import *
from os import system, name
from time import sleep
import ctypes
import re
from tqdm import tqdm
from tqdm import tqdm_gui
linecounter = 0
with open("words.txt",'r') as f:
for line in f:
linecounter = linecounter + 1
def clear():
if name == 'nt':
system('cls')
else:
system('clear')
wordappend = open("available.txt", "a")
words = open("words.txt", "r")
url = "https://namemc.com/search?q="
hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'Accept-Encoding': 'none',
'Accept-Language': 'en-US,en;q=0.8',
'Connection': 'keep-alive'}
counter = 0
availablele = 0
availablesoon = 0
myCoolTitle = "[+] STARTING | COMPLETED " + str(counter) + "/" + str(linecounter) + "|"
ctypes.windll.kernel32.SetConsoleTitleW(myCoolTitle)
pbar = tqdm_gui(total=linecounter)
for line in words:
try:
clear()
counter = counter + 1
pbar.set_description("Available: " + str(availablele) + " | " + "Available Soon: " + str(availablesoon) + " |")
pbar.update(+1)
myCoolTitle = "RUNNING | COMPLETED " + str(counter) + \
"/" + str(linecounter) + " | " + "Available: " + str(availablele) + \
" | " + "Available Soon: " + str(availablesoon) + " |"
ctypes.windll.kernel32.SetConsoleTitleW(myCoolTitle)
sleep(2)
url2 = url + line
req = Request(url2, headers=hdr)
page = urlopen(req)
soup = BeautifulSoup(page, "html.parser")
soup2 = str(soup)
if "Unavailable" in soup2:
print("[+]" + str(line) + " is unavailable")
clear()
elif "Available Later" in soup2:
availablesoon = availablesoon + 1
print("[+]" + line + " is available later!!!")
availabledate = soup.find("meta", {"name": "og:description"})
cumsock = str(availabledate)
cumsock2 = cumsock.split("t=\"")[1]
wordappend.write("\n [+]"+ line + " Is available later " + cumsock2.split("Z,")[0])
clear()
continue
elif "Available" in soup2:
availablele = availablele + 1
print("[+]" + line + " is available!!!")
wordappend.write("\n [+]" + line + " Is available!")
clear()
continue
except KeyboardInterrupt:
clear()
print("Exiting...")
sleep(2)
quit
except:
clear()
print("error " + str(IOError))
print("Requesting too frequently, waiting 60 seconds.")
pbar.set_description("[+] SLEEPING FOR 60 SECONDS")
sleep(60)
continue
pbar.close()
words.close()
wordappend.close()