Skip to content

Commit

Permalink
🐛 Minor patch to fix custom site support in 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
crock committed Apr 11, 2020
1 parent 67c13a5 commit 7937cad
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This is a script I made a while back to check the availability of OG words as ha
- Kik

### Comptability
Version `1.9` is incompatible with custom site URLs. Use `1.8` for this feature.
Version `1.9.0` is incompatible with custom site URLs. Please revert back to `1.8` via the Release tab on GitHub or upgrade to 1.9.1 which patched the bug.

Version `1.4-1.9+` is only compatible with Python 3+

Expand Down
6 changes: 3 additions & 3 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
; If your target site is not listed, put "1" for CUSTOM (without the quotes).
siteNum = 5
; Fill in the option below with the profile URL of the service you want to check available names for.
; Use %%word%% or %%name%% as the placeholder for the username to check.
; Use _word_ or _name_ the placeholder for the username to check.
; customSite is only for sites not specifically listed in the chart above, but please be aware
; that not every site will work this way. If there is a service you would like to see support for, please
; don't hesistate to let Croc know.
; don't hesistate to let Croc#1111 know on Discord.
; DO NOT PUT QUOTATION MARKS AROUND URL!
customSite = http://example.com/%%word%%
customSite = https://example.com/_word_

[lists]
; Be sure to include the file extension if it has one
Expand Down
6 changes: 3 additions & 3 deletions lib/ConfigHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re

# Regex Patterns
PLACEHOLDER = r"%%(name|word)%%"
PLACEHOLDER = r"_(word|name)_"
URLPATT = r"(^https?:\/\/[-.a-zA-Z0-9]+)"
DOMAIN = r"(?:https:\/\/)?(?:\w+\.)?(\w+)\.\w+\/?"

Expand All @@ -13,12 +13,12 @@
class ConfigHelper:

def getSite(self):
return config.getint('site', 'siteNum', fallback=5,)
return config.getint('site', 'siteNum', fallback=5)


def getCustomUrl(self):
url = config.get('site', 'customSite')
if re.match(PLACEHOLDER, url):
if re.search(PLACEHOLDER, url):
return url


Expand Down
2 changes: 1 addition & 1 deletion lib/ProxyHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def checkJob(self, proxy):
}
try:
r = self.session.get('https://google.com', timeout=4, proxies=proxyDict)
if r.status_code is 200:
if r.status_code == 200:
self.good.append(proxy)
with self.print_lock:
print("%s is working..." % proxy)
Expand Down
1 change: 0 additions & 1 deletion lib/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def requestJob(item):
with print_lock:
print("["+threading.current_thread().name+"] "+word+" is UNAVAILABLE on pastebin because it has illegal length.")
else:

link = replace(word)
s = requests.Session()
if ch.enableProxy():
Expand Down
1 change: 1 addition & 0 deletions lib/replace.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import re
import sys
from lib.ConfigHelper import ConfigHelper, PLACEHOLDER

ch = ConfigHelper()
Expand Down
9 changes: 9 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import requests

possibleCharacters = []
possibleCharacters[:0] = 'abcdefghijklmnopqrstuvwxyz0123456789'
print(possibleCharacters)
finalString = ""

for character in possibleCharacters:
finalString =

0 comments on commit 7937cad

Please sign in to comment.