Skip to content

Commit 883ea0c

Browse files
committed
The Bug Expedition v1.8
1 parent 76c20ec commit 883ea0c

File tree

17 files changed

+198
-156
lines changed

17 files changed

+198
-156
lines changed

.gitignore

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,21 @@
88
# Keeping my personal OG findings private hehe ;)
99
AVAILABLE.txt
1010

11+
# Get yer own word lists...
12+
word_lists/OG-LIST2.txt
13+
word_lists/TEST-LIST
14+
1115
# No, you can't have my proxies...
12-
proxy_lists/proxies.txt
16+
proxy_lists/private_proxies.txt
1317
proxy_lists/good_proxies.txt
1418
proxy_lists/bad_proxies.txt
1519

16-
# Feature not ready for release
17-
run_script_mac.command
18-
run_script_mac.sh
19-
2020
# Cache files
21-
lib/__pycache__
21+
lib/__pycache__
22+
23+
# Archives
24+
ogcheckr.tar.gz
25+
26+
# Other files
27+
setup.py
28+
scripts/*

CHANGELOG

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,22 @@
22
CURRENT RELEASE
33
================================
44

5+
The Bug Expedition
6+
v1.8 (April 1, 2018)
7+
8+
- Completely re-wrote the broken proxy integration and filtering system
9+
- Added the ability to disable proxy filtering. This was the most requested feature and now it's finally here!
10+
- Added support for SOCKS proxies. No need to do anything special, just put them in your proxy list as any other proxy.
11+
- Added Giphy channel support
12+
- Removed and consolidated some of the files in the libs/ directory
13+
14+
================================
15+
LAST RELEASE
16+
================================
17+
518
The Glorious Update
619
v1.7 (November 21, 2017)
720

821
- Implemented proxy checker and filtering system
922
- Re-implemented Instagram support
10-
- Added Pastebin user support
11-
12-
================================
13-
PAST RELEASES
14-
================================
23+
- Added Pastebin user support

OGCheckr.py

Lines changed: 5 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,15 @@
22
# Python Standard Modules
33
import sys
44
import os
5-
import threading
6-
from queue import Queue
7-
import time
8-
from lib.proxy import *
95
from lib.configure import getSite as SITE
106
from lib.configure import enableProxy as PROXY
11-
from lib.configure import numThreads as THREADS
12-
from lib.configure import getProxyList as PROXYLIST
13-
from lib.configure import getBadProxyList as BADPROXYLIST
14-
15-
print_lock = threading.Lock()
16-
plist = get_proxy_list()
17-
numProxies = len(plist)
18-
q = Queue()
19-
20-
def requestJob(proxy):
21-
if check_proxy(proxy):
22-
with print_lock:
23-
print("%s is working" % proxy)
24-
25-
def threader():
26-
while True:
27-
item = q.get()
28-
requestJob(item)
29-
q.task_done()
7+
from lib.configure import proxyFiltering as PFILTER
8+
from lib.ProxyHelper import ProxyHelper
309

3110
def main():
32-
if PROXY and plist is not None:
33-
print("Checking and filtering out bad proxies...")
34-
start = time.time()
35-
36-
for x in range(THREADS()):
37-
t = threading.Thread(target = threader)
38-
t.daemon = True
39-
t.start()
40-
41-
for item in plist:
42-
q.put(item)
43-
44-
q.join()
45-
46-
f = open('proxy_lists/good_proxies.txt', 'a')
47-
for p in good_proxies:
48-
f.write("%s\n" % str(p))
49-
f.close()
50-
51-
f = open('proxy_lists/bad_proxies.txt', 'a')
52-
for p in bad_proxies:
53-
f.write("%s\n" % str(p))
54-
f.close()
55-
56-
total = str(time.time()-start)
57-
numBad = len(bad_proxies)
58-
print("\nSearched %s numProxies and filtered out %s bad proxies in %s seconds" % (numProxies ,numBad, total))
11+
if PROXY() == "True":
12+
if PFILTER() == "True":
13+
ProxyHelper().checkProxies()
5914

6015
if (SITE() == 5) or (SITE() == 6): # Steam
6116
import lib.parse
@@ -64,8 +19,5 @@ def main():
6419
else:
6520
import lib.get
6621

67-
os.remove(PROXYLIST())
68-
os.rename('proxy_lists/good_proxies.txt', PROXYLIST())
69-
7022
if __name__ == "__main__":
7123
main()

config.ini

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
; | GITHUB | 10 |
1515
; | ABOUT.ME | 11 |
1616
; | YOUTUBE | 12 |
17-
; | PASTEBIN | 13 |
17+
; | PASTEBIN | 13 |
18+
; | GIPHY | 14 |
1819
; _________________________________
1920

2021
[site]
2122
; Place the number from the table above that corresponds
2223
; with the site you want to check available names for.
2324
; If your target site is not listed, put "1" for CUSTOM (without the quotes).
24-
siteNum = 3
25+
siteNum = 5
2526
; Fill in the option below with the profile URL of the service you want to check available names for.
2627
; Use %%word%% as the placeholder for the username to check.
2728
; customSite is only for sites not specifically listed in the chart above, but please be aware
@@ -34,18 +35,21 @@ customSite = http://example.com/%%word%%
3435
; Be sure to include the file extension if it has one
3536
output = AVAILABLE.txt
3637
; Place all word lists in the word_lists directory
37-
wordList = EXAMPLE-500.txt
38+
wordList = EXAMPLE-50.txt
3839

3940
[proxy]
4041
; To enable proxy support, put True. To disable, put False
41-
enableProxy = True
42+
enableProxy = False
43+
; To enable proxy filtering (sorting out the bad proxies that no longer work), put True.
44+
; To disable, put False. It has no effect if enableProxy is False
45+
proxyFiltering = True
4246
; If proxy support is enabled, you must specify the path to the proxy list you want to use here
4347
; Place all proxy lists in the proxy_lists directory
44-
; Place one proxy per line in the this format "###.###.###.###:####"
48+
; Place one proxy per line in the this format --> ip:port
4549
proxyList = proxies.txt
4650

4751
[multithreading]
48-
; To check your word lists with increased speed, you can now use multi-threading
52+
; To check your word lists with increased speed, you can use multi-threading
4953
; to take full advantage of your device's hardware.
5054
; Enter the number of threads you would like to use below
51-
threadCount = 10
55+
threadCount = 3

lib/ProxyHelper.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import os
2+
import threading
3+
from queue import Queue
4+
import time
5+
import requests
6+
from lib.configure import getProxyList as PROXYLIST
7+
from lib.configure import numThreads as THREADCOUNT
8+
from lib.configure import config
9+
10+
class ProxyHelper():
11+
12+
def __init__(self):
13+
self.session = requests.Session()
14+
self.proxies = PROXYLIST()
15+
self.numProxies = len(PROXYLIST())
16+
self.print_lock = threading.Lock()
17+
self.queue = Queue()
18+
self.good = []
19+
self.bad = []
20+
21+
def checkJob(self, proxy):
22+
#sess = self.setProxy(self.session, proxy)
23+
proxyDict = {
24+
'http:' : proxy,
25+
'https:' : proxy,
26+
'socks' : proxy
27+
}
28+
try:
29+
r = self.session.get('https://google.com', timeout=4, proxies=proxyDict)
30+
if r.status_code is 200:
31+
self.good.append(proxy)
32+
with self.print_lock:
33+
print("%s is working..." % proxy)
34+
else:
35+
raise Exception("Bad Proxy!")
36+
except Exception as error:
37+
self.bad.append(proxy)
38+
print(error)
39+
40+
41+
def threader(self):
42+
while True:
43+
item = self.queue.get()
44+
self.checkJob(item)
45+
self.queue.task_done()
46+
47+
def setProxy(self, session, proxy):
48+
if proxy is not None:
49+
session.proxies.update({
50+
'http:' : proxy,
51+
'https:' : proxy,
52+
'socks' : proxy
53+
})
54+
return session
55+
56+
def checkProxies(self):
57+
58+
print("Checking and filtering out bad proxies...")
59+
start = time.time()
60+
61+
print("Starting up threads...")
62+
for x in range(THREADCOUNT()):
63+
t = threading.Thread(target = self.threader)
64+
t.daemon = True
65+
t.start()
66+
print("[Thread-%d] has started." % x)
67+
68+
for item in self.proxies:
69+
self.queue.put(item)
70+
71+
self.queue.join()
72+
print("Done.")
73+
74+
gp = open('proxy_lists/good_proxies.txt', 'a')
75+
for p in self.good:
76+
gp.write("%s\n" % str(p))
77+
gp.close()
78+
79+
bp = open('proxy_lists/bad_proxies.txt', 'a')
80+
for p in self.bad:
81+
bp.write("%s\n" % str(p))
82+
bp.close()
83+
84+
total = str(time.time()-start)
85+
numBad = len(self.bad)
86+
print("\nSearched %s proxies and filtered out %s bad proxies in %s seconds" % (self.numProxies, numBad, total))
87+
88+
path = "proxy_lists/%s" % config["proxy"]["proxyList"]
89+
os.remove(path)
90+
os.rename('proxy_lists/good_proxies.txt', path)

lib/configure.py

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,34 @@ def enableProxy():
3232
print("Either True or False must be specified for enableProxy in the config file.")
3333
exit()
3434
else:
35-
return str(x)
35+
return x
3636

37-
def getProxyList():
38-
x = "proxy_lists/" + config['proxy']['proxyList']
37+
def proxyFiltering():
38+
x = config['proxy']['proxyFiltering']
3939
if x == "":
40-
print("Place just the filename of the list for proxyList in the config file.\nAll proxy lists go in the proxy_lists directory.")
40+
print("Either True or False must be specified for proxyFiltering in the config file.")
4141
exit()
4242
else:
43-
return str(x)
43+
return x
4444

45-
def getGoodProxyList():
46-
return "proxy_lists/good_proxies.txt"
47-
48-
def getBadProxyList():
49-
return "proxy_lists/bad_proxies.txt"
45+
def getProxyList():
46+
proxies = []
47+
path = "proxy_lists/" + config['proxy']['proxyList']
48+
if path is not None:
49+
fx = open(path, 'r')
50+
proxies = fx.read().split('\n')
51+
fx.close()
52+
return proxies
53+
else:
54+
if not enableProxy():
55+
print("Proxy support is disabled. Please enable it in the config.")
56+
exit()
57+
elif proxies is None:
58+
print("Specified proxy list is empty. Please add some proxies.")
59+
exit()
60+
else:
61+
print("Unkown error.")
62+
exit()
5063

5164
def getWordList():
5265
x = "word_lists/" + config['lists']['wordList']

lib/generate.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

lib/get.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
import threading
44
from queue import Queue
55
import time
6-
from lib.proxy import *
7-
from lib.log import *
6+
from lib.ProxyHelper import ProxyHelper
7+
from lib.log import log_result
88
from lib.replace import replace
99
from lib.configure import enableProxy as PROXY
10+
from lib.configure import getProxyList as PROXYLIST
1011
from lib.configure import getSite as SITE
1112
from lib.configure import numThreads as THREADS
1213
from lib.configure import getWordList as WORD_LIST
@@ -22,10 +23,10 @@ def requestJob(item):
2223
word = words[item]
2324
link = replace(word)
2425
s = requests.Session()
25-
if PROXY():
26-
plist = get_proxy_list()
26+
if PROXY() == "True":
27+
plist = PROXYLIST()
2728
i = random.randrange(0, plist.__len__())
28-
sess = set_proxy(s, plist[i])
29+
sess = ProxyHelper().setProxy(s, plist[i])
2930
r = sess.get(link)
3031
else:
3132
r = s.get(link)

lib/log.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import re
2-
from lib.statuses import *
2+
from lib.statuses import available, taken, manual
33
from lib.configure import getSite as SITE
44
from lib.configure import DOMAIN
55

@@ -35,6 +35,8 @@ def log_result(response, word, link, matches=None):
3535
taken(word, service)
3636
if 'errorMessage' in obj:
3737
print(obj['errorMessage'])
38+
else:
39+
available(word, service, None)
3840
elif SITE() == 9: # Mixer
3941
obj = response.json()
4042
if 'statusCode' in obj:

lib/parse.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import threading
55
from queue import Queue
66
import time
7-
from lib.proxy import *
8-
from lib.log import *
9-
from lib.replace import *
7+
from lib.ProxyHelper import ProxyHelper
8+
from lib.log import log_result
9+
from lib.replace import replace
1010
from lib.configure import enableProxy as PROXY
11-
from lib.proxy import *
11+
from lib.configure import getProxyList as PROXYLIST
1212
from lib.configure import getSite as SITE
1313
from lib.configure import numThreads as THREADS
1414
from lib.configure import getWordList as WORD_LIST
@@ -24,10 +24,10 @@ def parseJob(item):
2424
word = words[item]
2525
link = replace(word)
2626
s = requests.Session()
27-
if PROXY:
28-
plist = get_proxy_list()
27+
if PROXY() == "True":
28+
plist = PROXYLIST()
2929
i = random.randrange(0, plist.__len__())
30-
sess = set_proxy(s, plist[i])
30+
sess = ProxyHelper().setProxy(s, plist[i])
3131
r = sess.get(link)
3232
else:
3333
r = s.get(link)

0 commit comments

Comments
 (0)