From c97a814d269987f1614e98efee71774e1b93bea7 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 27 May 2020 17:57:38 +0200 Subject: [PATCH] Trying to deal with Travis CI problem --- extra/vulnserver/vulnserver.py | 4 +++- lib/core/settings.py | 2 +- lib/core/testing.py | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/extra/vulnserver/vulnserver.py b/extra/vulnserver/vulnserver.py index ebde61ce5..17f8b8008 100644 --- a/extra/vulnserver/vulnserver.py +++ b/extra/vulnserver/vulnserver.py @@ -18,6 +18,7 @@ import traceback PY3 = sys.version_info >= (3, 0) UNICODE_ENCODING = "utf-8" +DEBUG = False if PY3: from http.client import INTERNAL_SERVER_ERROR @@ -83,7 +84,8 @@ class ThreadingServer(ThreadingMixIn, HTTPServer): try: HTTPServer.finish_request(self, *args, **kwargs) except Exception: - traceback.print_exc() + if DEBUG: + traceback.print_exc() class ReqHandler(BaseHTTPRequestHandler): def do_REQUEST(self): diff --git a/lib/core/settings.py b/lib/core/settings.py index ebe0d0506..33f03357f 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.4.5.31" +VERSION = "1.4.5.32" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/core/testing.py b/lib/core/testing.py index 98de0f85c..da3b4b260 100644 --- a/lib/core/testing.py +++ b/lib/core/testing.py @@ -86,9 +86,13 @@ def vulnTest(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.connect((address, port)) - break + s.send(b"GET / HTTP/1.0\r\n\r\n") + if s.recv(4096): + break except: time.sleep(1) + finally: + s.close() handle, config = tempfile.mkstemp(suffix=".conf") os.close(handle)