Skip to content

Commit 70b5612

Browse files
author
ekultek
committed
deprecated intel AMT bypass scanner, full batch functionality implemented, edited the deprecation method so it will no longer try to connect to the function, added extracted to the skip schema when writing log files, created a way to display the question with the default choice displayed as well, welcome to version 1.2
1 parent 3db01c4 commit 70b5612

File tree

1 file changed

+55
-34
lines changed

1 file changed

+55
-34
lines changed

lib/core/settings.py

+55-34
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from lib.attacks import (
3838
nmap_scan,
3939
sqlmap_scan,
40-
intel_me
40+
intel_me # TODO:/ completely remove
4141
)
4242

4343
try:
@@ -53,7 +53,7 @@
5353
CLONE = "https://github.com/ekultek/zeus-scanner.git"
5454

5555
# current version <major.minor.commit.patch ID>
56-
VERSION = "1.1.28".format(PATCH_ID)
56+
VERSION = "1.2".format(PATCH_ID)
5757
# colors to output depending on the version
5858

5959
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
@@ -402,18 +402,36 @@ def grab_random_agent(agent_path="{}/etc/text_files/agents.txt", verbose=False):
402402
return retval.strip()
403403

404404

405-
def prompt(question, opts=None):
405+
def prompt(question, opts=None, default=None):
406406
"""
407407
ask a question
408408
"""
409-
if opts is not None:
409+
if opts is not None and default is None:
410410
options = '/'.join(opts)
411411
return raw_input(
412412
"[{} {}] {}[{}]: ".format(
413413
time.strftime("%H:%M:%S"),
414414
"PROMPT", question, options
415415
)
416416
)
417+
elif default is not None:
418+
if opts is not None:
419+
options = "/".join(opts)
420+
print(
421+
"[{} {}] {}[{}] {}".format(
422+
time.strftime("%H:%M:%S"), "PROMPT",
423+
question, options, default
424+
)
425+
)
426+
return default
427+
else:
428+
print(
429+
"[{} {}] {} {}".format(
430+
time.strftime("%H:%M:%S"), "PROMPT",
431+
question, default
432+
)
433+
)
434+
return default
417435
else:
418436
return raw_input(
419437
"[{} {}] {} ".format(
@@ -506,7 +524,7 @@ def write_to_log_file(data_to_write, path, filename):
506524
os.getcwd()
507525
))) + 1)
508526
)
509-
skip_log_schema = ("url-log", "blackwidow-log", "zeus-log")
527+
skip_log_schema = ("url-log", "blackwidow-log", "zeus-log", "extracted")
510528
to_search = filename.split("-")[0]
511529
amount = len([f for f in os.listdir(path) if to_search in f])
512530
new_filename = "{}({}).{}".format(
@@ -787,33 +805,36 @@ def check_for_protection(protected, attack_type):
787805
logger.warning(set_color(
788806
"provided target seems to have protection against this attack type...", level=30
789807
))
790-
question = prompt(
791-
"continuing will most likely result in a failure, would you like to continue", opts="yN"
792-
)
793-
if question.lower().startswith("y"):
794-
return True
795-
else:
796-
logger.warning(set_color(
797-
"skipping provided target URL..."
798-
))
799-
return False
800808
return True
801809

802810

803-
def deprecation(target_version, function, *args, **kwargs):
811+
def deprecation(target_version, method, connect=True, *args, **kwargs):
804812
"""
805813
show a deprecation warning and return the function with the correct given arguments
806814
"""
807-
print(
808-
"[{} DEPRECATION] {}".format(
809-
time.strftime("%H:%M:%S"), set_color(
810-
"{} will be deprecated by version {}...".format(
811-
function.__name__, target_version
812-
), level=35
815+
if connect:
816+
print(
817+
"[{} DEPRECATION] {}".format(
818+
time.strftime("%H:%M:%S"), set_color(
819+
"{} will be deprecated by version {}...".format(
820+
method.__name__, target_version
821+
), level=35
822+
)
813823
)
814824
)
815-
)
816-
return function(args, kwargs)
825+
return method(args, kwargs)
826+
else:
827+
print(
828+
"[{} DEPRECATION] {}".format(
829+
time.strftime("%H:%M:%S"), set_color(
830+
"{} has been deprecated and will no longer work, "
831+
"this attack type will be completely removed by v{}...".format(
832+
method.__name__, target_version
833+
), level=35
834+
)
835+
)
836+
)
837+
shutdown()
817838

818839

819840
def run_attacks(url, **kwargs):
@@ -822,7 +843,7 @@ def run_attacks(url, **kwargs):
822843
"""
823844
nmap = kwargs.get("nmap", False)
824845
sqlmap = kwargs.get("sqlmap", False)
825-
intel = kwargs.get("intel", False)
846+
intel = kwargs.get("intel", False) # TODO:/ completely remove
826847
xss = kwargs.get("xss", False)
827848
admin = kwargs.get("admin", False)
828849
verbose = kwargs.get("verbose", False)
@@ -831,7 +852,7 @@ def run_attacks(url, **kwargs):
831852
auto_start = kwargs.get("auto_start", False)
832853
sqlmap_arguments = kwargs.get("sqlmap_args", None)
833854
nmap_arguments = kwargs.get("nmap_args", None)
834-
run_ip_address = kwargs.get("run_ip", False)
855+
run_ip_address = kwargs.get("run_ip", False) # TODO:/ completely remove
835856
show_all = kwargs.get("show_all", False)
836857
do_threading = kwargs.get("do_threading", False)
837858
batch = kwargs.get("batch", False)
@@ -846,7 +867,7 @@ def run_attacks(url, **kwargs):
846867
"port": nmap,
847868
"xss": xss,
848869
"admin": admin,
849-
"intel": intel,
870+
"intel": intel, # TODO:/ completely remove
850871
"whois": whois,
851872
"clickjacking": clickjacking
852873
}
@@ -865,12 +886,15 @@ def run_attacks(url, **kwargs):
865886
))
866887
shutdown()
867888

889+
question_msg = "would you like to process found URL: '{}'".format(url)
868890
if not batch:
869891
question = prompt(
870-
"would you like to process found URL: '{}'".format(url), opts=["y", "N"]
892+
question_msg, opts="yN"
871893
)
872894
else:
873-
question = "y"
895+
question = prompt(
896+
question_msg, opts="yN", default="y"
897+
)
874898

875899
if question.lower().startswith("y"):
876900
if sqlmap:
@@ -883,12 +907,9 @@ def run_attacks(url, **kwargs):
883907
url_ip_address, verbose=verbose,
884908
opts=create_arguments(nmap=True, nmap_args=nmap_arguments)
885909
)
886-
elif intel:
887-
url = get_true_url(url)
910+
elif intel: # TODO:/ completely remove
888911
return deprecation(
889-
"1.2", intel_me.main_intel_amt, url,
890-
verbose=verbose, proxy=proxy,
891-
do_ip=run_ip_address
912+
"1.3", intel_me.main_intel_amt, connect=False
892913
)
893914
elif admin:
894915
main(

0 commit comments

Comments
 (0)