-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
197 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
![OGCheckr CLI username availability checker application](http://d.pr/i/M94CyF+ "OGCheckr CLI") | ||
![OGCheckr CLI username availability checker application](https://i.imgur.com/77zuFqp.png "OGCheckr CLI") | ||
|
||
For additional information and installation instructions, view the wiki. | ||
https://github.com/ogplus/cli-checker/wiki/ | ||
https://github.com/crock/cli-checker/wiki/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import configparser | ||
import os | ||
import re | ||
|
||
# Regex Patterns | ||
PLACEHOLDER = r"%%(name|word)%%" | ||
URLPATT = r"(^https?:\/\/[-.a-zA-Z0-9]+)" | ||
DOMAIN = r"(?:https:\/\/)?(?:\w+\.)?(\w+)\.\w+\/?" | ||
|
||
config = configparser.ConfigParser() | ||
config.read('config.ini') | ||
|
||
class ConfigHelper: | ||
|
||
def getSite(self): | ||
return config.getint('site', 'siteNum', fallback=5,) | ||
|
||
|
||
def getCustomUrl(self): | ||
url = config.get('site', 'customSite') | ||
if re.match(PLACEHOLDER, url): | ||
return url | ||
|
||
|
||
def enableProxy(self): | ||
return config.getboolean('proxy', 'enableProxy', fallback=False) | ||
|
||
|
||
def proxyFiltering(self): | ||
return config.getboolean('proxy', 'proxyFiltering', fallback=False) | ||
|
||
|
||
def getProxies(self, filename_only=False): | ||
if filename_only is True: | ||
return config.get('proxy', 'proxyList') | ||
proxies = [] | ||
path = os.path.join("proxy_lists", config.get('proxy', 'proxyList')) | ||
if path is not None: | ||
fx = open(path, 'r') | ||
proxies = fx.read().split('\n') | ||
fx.close() | ||
return proxies | ||
else: | ||
if not self.enableProxy(): | ||
print("Proxy support is disabled. Please enable it in the config.") | ||
exit() | ||
elif proxies is None: | ||
print("Specified proxy list is empty. Please add some proxies.") | ||
exit() | ||
else: | ||
print("Unknown error.") | ||
exit() | ||
|
||
def getWords(self): | ||
words = [] | ||
path = os.path.join("word_lists", config.get('lists', 'wordList')) | ||
if path is not None: | ||
fx = open(path, 'r') | ||
words = fx.read().split('\n') | ||
fx.close() | ||
return words | ||
else: | ||
print("Word list not found.\n[DEBUG] %s" % path) | ||
|
||
|
||
def getOutputList(self): | ||
return config.get('lists', 'output', fallback="AVAILABLE.txt") | ||
|
||
|
||
def numThreads(self): | ||
return config.getint('multithreading', 'threadCount') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import requests | ||
from lib.replace import * | ||
from lib.configure import getSite as SITE | ||
from lib.ConfigHelper import ConfigHelper | ||
from lib.ProxyHelper import ProxyHelper | ||
|
||
ch = ConfigHelper() | ||
ph = ProxyHelper() | ||
|
||
s = requests.Session() | ||
|
||
def get_cookie(): | ||
r = s.get(URLS[SITE()]) | ||
r = s.get(URLS[ch.getSite()]) | ||
return r.cookies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.