Skip to content

Commit 0a6dbd2

Browse files
committed
Fixing --openapi-only config file rejection and HAR export header-name casing
1 parent 1c869b7 commit 0a6dbd2

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

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

lib/parse/configfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ def configFileParser(configFile):
8484

8585
mandatory = False
8686

87-
for option in ("direct", "url", "logFile", "bulkFile", "googleDork", "requestFile", "wizard"):
87+
for option in ("direct", "url", "logFile", "bulkFile", "googleDork", "requestFile", "openApiFile", "wizard"):
8888
if config.has_option("Target", option) and config.get("Target", option) or cmdLineOptions.get(option):
8989
mandatory = True
9090
break
9191

9292
if not mandatory:
9393
errMsg = "missing a mandatory option in the configuration file "
94-
errMsg += "(direct, url, logFile, bulkFile, googleDork, requestFile or wizard)"
94+
errMsg += "(direct, url, logFile, bulkFile, googleDork, requestFile, openApiFile or wizard)"
9595
raise SqlmapMissingMandatoryOptionException(errMsg)
9696

9797
for family, optionData in optDict.items():

lib/utils/har.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def toDict(self):
116116
"httpVersion": self.httpVersion,
117117
"method": self.method,
118118
"url": self.url,
119-
"headers": [dict(name=key.capitalize(), value=value) for key, value in self.headers.items()],
119+
"headers": [dict(name="-".join(_.capitalize() for _ in key.split("-")), value=value) for key, value in self.headers.items()],
120120
"cookies": [],
121121
"queryString": [],
122122
"headersSize": -1,
@@ -202,7 +202,7 @@ def toDict(self):
202202
"httpVersion": self.httpVersion,
203203
"status": self.status,
204204
"statusText": self.statusText,
205-
"headers": [dict(name=key.capitalize(), value=value) for key, value in self.headers.items() if key.lower() != "uri"],
205+
"headers": [dict(name="-".join(_.capitalize() for _ in key.split("-")), value=value) for key, value in self.headers.items() if key.lower() != "uri"],
206206
"cookies": [],
207207
"content": content,
208208
"headersSize": -1,

0 commit comments

Comments
 (0)