multi-threading is broken, working on a fix, for now DO NOT use it

This commit is contained in:
ekultek 2017-10-12 10:43:13 -05:00
parent 1710e05704
commit c008f93d16
3 changed files with 15 additions and 14 deletions

View file

@ -1,5 +1,5 @@
import os
import threading
import multiprocessing
try: # Python 2
from urllib.request import urlopen
@ -131,7 +131,7 @@ def __load_extensions(filename="{}/etc/link_ext.txt"):
return ext.readlines()
def main(url, show=False, verbose=False, do_threading=False, threads=10):
def main(url, show=False, verbose=False, do_threading=False, proc_num=3):
logger.info(set_color(
"parsing robots.txt..."
))
@ -152,18 +152,19 @@ def main(url, show=False, verbose=False, do_threading=False, threads=10):
"attempting to bruteforce admin panel..."
))
if do_threading:
if verbose:
logger.debug(set_color(
"starting {} threads...".format(threads), level=10
))
for _ in range(0, threads):
t = threading.Thread(target=check_for_admin_page, args=(url, extensions), kwargs={
logger.warning(set_color(
"starting parallel processing with {} processes, this "
"will depend on your GPU speed...".format(proc_num), level=30
))
tasks = []
for _ in range(0, proc_num):
p = multiprocessing.Process(target=check_for_admin_page, args=(url, extensions), kwargs={
"show_possibles": show,
"verbose": verbose
})
t.daemon = True
t.start()
t.join()
p.start()
tasks.append(p)
for proc in tasks:
proc.join()
else:
check_for_admin_page(url, extensions, show_possibles=show, verbose=verbose)

View file

@ -22,7 +22,7 @@ except NameError:
# clone link
CLONE = "https://github.com/ekultek/zeus-scanner.git"
# current version <major.minor.commit.patch ID>
VERSION = "1.0.39"
VERSION = "1.0.40.9d4b"
# colors to output depending on the version
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
# version string formatting

View file

@ -99,7 +99,7 @@ if __name__ == "__main__":
attacks.add_option("--tamper", dest="tamperXssPayloads", metavar="TAMPER-SCRIPT",
help="Send the XSS payloads through tampering before sending to the target")
attacks.add_option("--thread", dest="threadPanels", action="store_true",
help="Thread the admin panel finder, will start 10 threads")
help=optparse.SUPPRESS_HELP)
attacks.add_option("--auto", dest="autoStartSqlmap", action="store_true",
help=optparse.SUPPRESS_HELP)