From 5dbfa6bab2b9086782a2b3b219fbca8dfa8d12f4 Mon Sep 17 00:00:00 2001 From: wh0am1i <404-team@knownsec.com> Date: Fri, 29 Dec 2023 10:42:02 +0800 Subject: [PATCH] feat: add http debug level command & fix some bug --- pocsuite3/__init__.py | 2 +- pocsuite3/lib/core/option.py | 4 ++++ pocsuite3/lib/core/settings.py | 1 + pocsuite3/lib/parse/cmd.py | 1 + setup.py | 3 ++- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pocsuite3/__init__.py b/pocsuite3/__init__.py index 0a2c8c0b..f79758ae 100644 --- a/pocsuite3/__init__.py +++ b/pocsuite3/__init__.py @@ -1,5 +1,5 @@ __title__ = 'pocsuite3' -__version__ = '2.0.6' +__version__ = '2.0.7' __author__ = 'Knownsec 404 Team' __author_email__ = '404-team@knownsec.com' __license__ = 'GPLv2' diff --git a/pocsuite3/lib/core/option.py b/pocsuite3/lib/core/option.py index 7750aee4..b10dc9f2 100644 --- a/pocsuite3/lib/core/option.py +++ b/pocsuite3/lib/core/option.py @@ -7,6 +7,7 @@ import importlib from queue import Queue from urllib.parse import urlsplit +from http.client import HTTPConnection import docker.errors import socks @@ -56,6 +57,8 @@ def set_verbosity(): This function set the verbosity of pocsuite output messages. """ + HTTPConnection.debuglevel = int(conf.http_debug) + if conf.verbose is None: conf.verbose = 1 @@ -541,6 +544,7 @@ def _set_conf_attributes(): conf.retry = 0 conf.delay = 0 conf.http_headers = {} + conf.http_debug = 0 conf.ceye_token = None conf.oob_server = None conf.oob_token = None diff --git a/pocsuite3/lib/core/settings.py b/pocsuite3/lib/core/settings.py index 1cf744dc..80402f60 100644 --- a/pocsuite3/lib/core/settings.py +++ b/pocsuite3/lib/core/settings.py @@ -132,6 +132,7 @@ "retry", "delay", "headers", + "http-debug", "ceye-token", "oob-server", "oob-token", diff --git a/pocsuite3/lib/parse/cmd.py b/pocsuite3/lib/parse/cmd.py index cb83ae80..82c47f48 100644 --- a/pocsuite3/lib/parse/cmd.py +++ b/pocsuite3/lib/parse/cmd.py @@ -72,6 +72,7 @@ def cmd_line_parser(argv=None): request.add_argument("--retry", dest="retry", type=int, default=0, help="Time out retrials times (default 0)") request.add_argument("--delay", dest="delay", help="Delay between two request of one thread") request.add_argument("--headers", dest="headers", help="Extra headers (e.g. \"key1: value1\\nkey2: value2\")") + request.add_argument("--http-debug", dest="http_debug", type=int, default=0, help="HTTP debug level (default 0)") # Account options group = parser.add_argument_group("Account", "Account options") group.add_argument("--ceye-token", dest="ceye_token", help="CEye token") diff --git a/setup.py b/setup.py index cbc6f3c7..c6a46938 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ def find_packages(where='.'): setup( name='pocsuite3', - version='2.0.6', + version='2.0.7', url='https://pocsuite.org', description='Open-sourced remote vulnerability testing framework.', long_description=long_description, @@ -57,6 +57,7 @@ def find_packages(where='.'): "dacite", "PyYAML", "lxml", + "docker" ], extras_require={ 'complete': [