Skip to content

Commit cd70517

Browse files
committed
Fixed Steam/Steam Group support!
1 parent 758a487 commit cd70517

2 files changed

Lines changed: 35 additions & 20 deletions

File tree

UsernameChecker.py

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,17 @@ def available(word, service, link):
6666
fx.write(link + "\n")
6767
fx.close()
6868

69-
def log_result(response, word, link, element=None, matches=None):
69+
def log_result(response, word, link, matches=None):
7070
service = re.search(DOMAIN, link).group(1)
71-
if (matches != None) or (element != None):
72-
if matches:
71+
if matches != None:
72+
if matches[0] != []:
7373
available(word, service, link)
74+
elif matches[1]:
75+
taken(word, service)
76+
elif matches[2]:
77+
taken(word, service)
7478
else:
75-
if element:
76-
taken(word, service)
77-
else:
78-
available(word, service, link)
79+
print("The username " + word + " requires manual verification on " + service + " (" + str(response.status_code) + ")")
7980

8081
elif response.status_code == 200:
8182
if int(SITE) == 3: # Twitter
@@ -152,21 +153,33 @@ def parse_page(words):
152153
page = r.content
153154
soup = BeautifulSoup(page, "html.parser")
154155
matches = []
155-
elem = ""
156156
if int(SITE) == 5:
157-
matches = soup.find_all("h3")
158-
elem = soup.find('div', attrs={'class': 'profile_private_info'})
157+
# Available
158+
match1 = soup.body.findAll(text='The specified profile could not be found.')
159+
# Taken
160+
match2 = soup.body.findAll(text='This profile is private.')
161+
match3 = soup.find('div', attrs={'class': 'profile_header'})
162+
163+
matches = [match1, match2, match3]
159164
elif int(SITE) == 6:
160-
matches = soup.find_all("h3")
161-
elem = soup.find('div', attrs={'class': 'error_ctn'})
165+
# Available
166+
match1 = soup.body.findAll(text='No group could be retrieved for the given URL.')
167+
# Taken
168+
match2 = soup.body.findAll(text='Request To Join')
169+
match3 = soup.find('div', attrs={'class': 'grouppage_header'})
170+
171+
matches = [match1, match2, match3]
162172
elif int(SITE) == 8:
163-
matches = soup.find_all("h3")
164-
elem = soup.find('div', attrs={'id': 'player'})
165-
print(matches)
166-
print(elem)
173+
# Available
174+
match1 = soup.body.findAll(text='Sorry. Unless you\’ve got a time machine, that content is unavailable.')
175+
# Taken
176+
match2 = soup.find('div', attrs={'id': 'player'})
177+
match3 = soup.body.findAll(text='The community has closed this channel due to terms of service violations.')
178+
179+
matches = [match1, match2, match3]
167180
else:
168181
print("Wrong site!")
169-
log_result(r, words[w], link, element=elem, matches=matches)
182+
log_result(r, words[w], link, matches=matches)
170183

171184
def send_post(words):
172185
cookie = get_cookie()

config.ini

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@
2222
siteNum = 3
2323
; Fill in the option below with the profile URL of the service you want to check available names for.
2424
; Use %%word%% as the placeholder for the username to check.
25-
; Note: CUSTOM sites may or may not work as is and may require an update to the application to add support.
26-
customSite = https://google.com
25+
; customSite is only for sites not specifically listed in the chart above, but please be aware
26+
; that not every site will work this way. If there is a service you would like to see support for, please
27+
; don't hesistate to let Croc know.
28+
customSite = https://example.com
2729

2830
[lists]
2931
; Be sure to include the file extension if it has one
3032
output = AVAILABLE.txt
3133
; Place all word lists in the word_lists directory
32-
wordList = word_lists/HOT-WORDS
34+
wordList = word_lists/WORD-LIST-1
3335
; Place all proxy lists in the proxy_lists directory
3436
; PROXY SUPPORT IS NOT IMPLEMENTED YET
3537
proxyList = proxy_lists/proxies.txt

0 commit comments

Comments
 (0)