diff --git a/etc/checksum/md5sum.md5 b/etc/checksum/md5sum.md5 index ac066e1..416d42a 100644 --- a/etc/checksum/md5sum.md5 +++ b/etc/checksum/md5sum.md5 @@ -50,8 +50,8 @@ d8fab18b15d1546f6585fe926c27868f ./lib/attacks/whois_lookup/whois.py 21faf4679cdeaa731029a48f8963d6e7 ./lib/attacks/nmap_scan/nmap_opts.py 1faa2b5dfad6eb538bbfe42942d2a9da ./lib/core/errors.py d41d8cd98f00b204e9800998ecf8427e ./lib/core/__init__.py -d7882d1d6002eef2667d10ced8e5e4f4 ./lib/core/settings.py -60d6f072cc80f08e9214131dc33fe63a ./lib/header_check/__init__.py +7dfba7fabe755c6d9946097b41426458 ./lib/core/settings.py +ad6622a5170e4ec74b5172f12ddcba9f ./lib/header_check/__init__.py d41d8cd98f00b204e9800998ecf8427e ./var/google_search/__init__.py 049b8a1cc93dc44b12dd93efdf785412 ./var/google_search/search.py d41d8cd98f00b204e9800998ecf8427e ./var/__init__.py diff --git a/lib/core/settings.py b/lib/core/settings.py index 9dcf95c..ccc2fb2 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -52,7 +52,7 @@ PATCH_ID = str(subprocess.check_output(["git", "rev-parse", "origin/master"]))[: CLONE = "https://github.com/ekultek/zeus-scanner.git" # current version -VERSION = "1.2.5".format(PATCH_ID) +VERSION = "1.2.6".format(PATCH_ID) # colors to output depending on the version VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30} @@ -156,6 +156,9 @@ PORT_SCAN_LOG_PATH = "{}/log/scanner-log".format(os.getcwd()) # blackwidow log path SPIDER_LOG_PATH = "{}/log/blackwidow-log".format(os.getcwd()) +# cookies log path +COOKIE_LOG_PATH = "{}/log/cookies".format(os.getcwd()) + # the current log file being used CURRENT_LOG_FILE_PATH = "{}/log".format(os.getcwd()) diff --git a/lib/header_check/__init__.py b/lib/header_check/__init__.py index e321273..9c0dcb8 100644 --- a/lib/header_check/__init__.py +++ b/lib/header_check/__init__.py @@ -11,7 +11,8 @@ from lib.core.settings import ( write_to_log_file, HEADER_RESULT_PATH, replace_http, - shutdown + shutdown, + COOKIE_LOG_PATH ) @@ -52,6 +53,22 @@ def load_headers(url, **kwargs): ) } req = requests.get(url, params=header_value, proxies=proxy) + if len(req.cookies) > 0: + logger.info(set_color( + "found a request cookie, saving to file...", level=25 + )) + try: + cookie_start = req.cookies.keys() + cookie_value = req.cookies.values() + write_to_log_file( + "{}={}".format(''.join(cookie_start), ''.join(cookie_value)), + COOKIE_LOG_PATH, "{}-cookie.log".format(replace_http(url)) + ) + except Exception: + write_to_log_file( + [c for c in req.cookies.itervalues()], COOKIE_LOG_PATH, + "{}-cookie.log".format(replace_http(url)) + ) return req.headers