From d3225136e2ca935d25ff2a978dca3133d6aad3ec Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 21 May 2019 14:39:30 +0200 Subject: [PATCH] Minor patch (different drive letter) --- lib/core/settings.py | 2 +- sqlmap.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 6dfadd00e..4b77d87c9 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.3.5.125" +VERSION = "1.3.5.126" 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/sqlmap.py b/sqlmap.py index ec7c2528f..b812ac852 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -352,7 +352,10 @@ def main(): for match in re.finditer(r'File "(.+?)", line', excMsg): file_ = match.group(1) - file_ = os.path.relpath(file_, os.path.dirname(__file__)) + try: + file_ = os.path.relpath(file_, os.path.dirname(__file__)) + except ValueError: + pass file_ = file_.replace("\\", '/') if "../" in file_: file_ = re.sub(r"(\.\./)+", '/', file_)