From d72660ef0445dc4db3484b88d51acccef00e3b7c Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 1 Oct 2019 15:37:09 +0200 Subject: [PATCH] Adding a support for option-less URL arg --- lib/core/settings.py | 2 +- lib/parse/cmdline.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 681314e26..182fc1168 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.9.25" +VERSION = "1.3.10.0" 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/parse/cmdline.py b/lib/parse/cmdline.py index 71feedad2..8d7e36dd1 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -905,6 +905,8 @@ def cmdLineParser(argv=None): longOptions = set(re.findall(r"\-\-([^= ]+?)=", parser.format_help())) if argv[i] == "-hh": argv[i] = "-h" + elif i == 1 and argv[i].startswith("http"): + argv[i] = "--url=%s" % argv[i] elif len(argv[i]) > 1 and all(ord(_) in xrange(0x2018, 0x2020) for _ in ((argv[i].split('=', 1)[-1].strip() or ' ')[0], argv[i][-1])): dataToStdout("[!] copy-pasting illegal (non-console) quote characters from Internet is, well, illegal (%s)\n" % argv[i]) raise SystemExit