Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b3ab07

Browse files
committed
Adding short option(s) for setting verbosity (e.g. -vvv)
1 parent fef407e commit 3b3ab07

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.9.51"
22+
VERSION = "1.0.9.52"
2323
REVISION = getRevisionNumber()
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}

lib/parse/cmdline.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,6 @@ def _(self, *args):
885885
except ValueError, ex:
886886
raise SqlmapSyntaxException, "something went wrong during command line parsing ('%s')" % ex.message
887887

888-
# Hide non-basic options in basic help case
889888
for i in xrange(len(argv)):
890889
if argv[i] == "-hh":
891890
argv[i] = "-h"
@@ -913,6 +912,14 @@ def _(self, *args):
913912
if not found:
914913
parser.option_groups.remove(group)
915914

915+
for verbosity in (_ for _ in argv if re.search(r"\A\-v+\Z", _)):
916+
try:
917+
if argv.index(verbosity) == len(argv) - 1 or not argv[argv.index(verbosity) + 1].isdigit():
918+
conf.verbose = verbosity.count('v') + 1
919+
del argv[argv.index(verbosity)]
920+
except (IndexError, ValueError):
921+
pass
922+
916923
try:
917924
(args, _) = parser.parse_args(argv)
918925
except UnicodeEncodeError, ex:

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
9652b7cb6777148034310c0e66b2e85a lib/core/settings.py
48+
ddab16d302a21444b7f12de4630af2df lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
@@ -56,7 +56,7 @@ d43f059747ffd48952922c94152e2a07 lib/core/testing.py
5656
8485a3cd94c0a5af2718bad60c5f1ae5 lib/core/wordlist.py
5757
cc9c82cfffd8ee9b25ba3af6284f057e lib/__init__.py
5858
c1288bc4ce5651dbdd82d4a9435fdc03 lib/parse/banner.py
59-
498be08b12a01bd79d82fc993bd07965 lib/parse/cmdline.py
59+
bc8a27a451d988398d7e25a786b2c8a2 lib/parse/cmdline.py
6060
8ec4d4f02634834701f8258726f2e511 lib/parse/configfile.py
6161
fe4e2152292587928edb94c9a4d311ff lib/parse/handler.py
6262
8e6bfb13e5a34b2610f3ff23467a34cf lib/parse/headers.py

0 commit comments

Comments
 (0)