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

Skip to content

Commit 35893c4

Browse files
committed
Minor update of vuln-test
1 parent 1a5ed61 commit 35893c4

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

extra/vulnserver/vulnserver.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from __future__ import print_function
1111

12+
import json
1213
import re
1314
import sqlite3
1415
import sys
@@ -99,10 +100,13 @@ def do_REQUEST(self):
99100
return
100101

101102
if hasattr(self, "data"):
102-
params.update(parse_qs(self.data))
103+
if self.data.startswith('{') and self.data.endswith('}'):
104+
params.update(json.loads(self.data))
105+
else:
106+
params.update(parse_qs(self.data))
103107

104108
for key in params:
105-
if params[key]:
109+
if params[key] and isinstance(params[key], (tuple, list)):
106110
params[key] = params[key][-1]
107111

108112
self.url, self.params = path, params

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.10.15"
21+
VERSION = "1.3.10.16"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/core/testing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def _thread():
7575

7676
for options, checks in (
7777
("--flush-session", ("CloudFlare",)),
78+
("--flush-session --data='{\"id\": 1}' --banner", ("Payload: {\"id\"", "banner: '3")),
7879
("--flush-session --parse-errors --eval=\"id2=2\" --referer=\"localhost\" --cookie=\"PHPSESSID=d41d8cd98f00b204e9800998ecf8427e\"", (": syntax error", "Type: boolean-based blind", "Type: time-based blind", "Type: UNION query", "back-end DBMS: SQLite", "3 columns")),
7980
("--banner --schema --dump -T users --binary-fields=surname --where \"id>3\"", ("banner: '3", "INTEGER", "TEXT", "id", "name", "surname", "2 entries", "6E616D6569736E756C6C")),
8081
("--all --tamper=between,randomcase", ("5 entries", "luther", "blisset", "fluffy", "179ad45c6ce2cb97cf1029e212046e81", "NULL", "nameisnull", "testpass")),

0 commit comments

Comments
 (0)