From afc3b30c412e0df59528810e465b7abba4df4a6c Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 20 Dec 2016 09:56:44 +0100 Subject: [PATCH] Minor refactoring --- lib/core/common.py | 7 ++++++- lib/core/settings.py | 2 +- txt/checksum.md5 | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 7e5bbb8e0..0804bbd60 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3842,7 +3842,12 @@ def checkSameHost(*urls): False """ - return all(urlparse.urlparse(url or "").netloc.split(':')[0] == urlparse.urlparse(urls[0] or "").netloc.split(':')[0] for url in urls) + if not urls: + return None + elif len(urls) == 1: + return True + else: + return all(urlparse.urlparse(url or "").netloc.split(':')[0] == urlparse.urlparse(urls[0] or "").netloc.split(':')[0] for url in urls[1:]) def getHostHeader(url): """ diff --git a/lib/core/settings.py b/lib/core/settings.py index 6eef84aeb..3dc16e376 100755 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.0.12.12" +VERSION = "1.0.12.13" 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/txt/checksum.md5 b/txt/checksum.md5 index 32786e9ed..0811f876f 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -26,7 +26,7 @@ ec007a1424da78cfdae90da6ae49ed9b lib/controller/handler.py cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py cdffff6260c40ccb4e4092fc21d9d63f lib/core/agent.py eb0bd28b0bd9fbf67dcc3119116df377 lib/core/bigarray.py -88578e4e2dd5f01cf0098dcd276ca598 lib/core/common.py +55f6745ac8157ba1b6b0ba1b4ce78d78 lib/core/common.py ab5ef8fe4e4beaef4016d458d0fdefe3 lib/core/convert.py e77cca1cb063016f71f6e6bdebf4ec73 lib/core/data.py 1d042f0bc0557d3fd564ea5a46deb77e lib/core/datatype.py @@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py b3a62d41a5af6cd7fa733b6227febb0c lib/core/replication.py dfb664b223ac3585d51e58839b777d9b lib/core/revision.py 7c15dd2777af4dac2c89cab6df17462e lib/core/session.py -0e55924e1cd0e5ecdf0173e16ebefd5b lib/core/settings.py +731e3372164a2d0283444f90bbbb150b lib/core/settings.py 7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py 23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py c3ace7874a536d801f308cf1fd03df99 lib/core/target.py