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

Skip to content

Commit f2b4dc3

Browse files
committed
Fixes #3275
1 parent d1022f3 commit f2b4dc3

3 files changed

Lines changed: 16 additions & 11 deletions

File tree

lib/controller/controller.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
from lib.core.exception import SqlmapNotVulnerableException
5757
from lib.core.exception import SqlmapSilentQuitException
5858
from lib.core.exception import SqlmapSkipTargetException
59+
from lib.core.exception import SqlmapSystemException
5960
from lib.core.exception import SqlmapValueException
6061
from lib.core.exception import SqlmapUserQuitException
6162
from lib.core.settings import ASP_NET_CONTROL_REGEX
@@ -243,16 +244,20 @@ def _saveToResultsFile():
243244

244245
results[key].extend(injection.data.keys())
245246

246-
for key, value in results.items():
247-
place, parameter, notes = key
248-
line = "%s,%s,%s,%s,%s%s" % (safeCSValue(kb.originalUrls.get(conf.url) or conf.url), place, parameter, "".join(techniques[_][0].upper() for _ in sorted(value)), notes, os.linesep)
249-
conf.resultsFP.write(line)
247+
try:
248+
for key, value in results.items():
249+
place, parameter, notes = key
250+
line = "%s,%s,%s,%s,%s%s" % (safeCSValue(kb.originalUrls.get(conf.url) or conf.url), place, parameter, "".join(techniques[_][0].upper() for _ in sorted(value)), notes, os.linesep)
251+
conf.resultsFP.write(line)
250252

251-
if not results:
252-
line = "%s,,,,%s" % (conf.url, os.linesep)
253-
conf.resultsFP.write(line)
253+
if not results:
254+
line = "%s,,,,%s" % (conf.url, os.linesep)
255+
conf.resultsFP.write(line)
254256

255-
conf.resultsFP.flush()
257+
conf.resultsFP.flush()
258+
except IOError, ex:
259+
errMsg = "unable to write to the results file '%s' ('%s'). " % (conf.resultsFilename, getSafeExString(ex))
260+
raise SqlmapSystemException(errMsg)
256261

257262
@stackedmethod
258263
def start():

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.enums import OS
2020

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

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py
2424
c1bccc94522d3425a372dcd57f78418e extra/wafdetectify/wafdetectify.py
2525
3459c562a6abb9b4bdcc36925f751f3e lib/controller/action.py
2626
61b66a7c30eb43c6b99ad57e4a8b5b22 lib/controller/checks.py
27-
c414cecdb0472c92cf50ed5b01e4438c lib/controller/controller.py
27+
d6deacb76e1f479b3c690c215fad1c08 lib/controller/controller.py
2828
c7443613a0a2505b1faec931cee2a6ef lib/controller/handler.py
2929
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
3030
effd6e6a07b13fd8b3803ed4b89b06e2 lib/core/agent.py
@@ -49,7 +49,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
4949
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5050
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5151
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
52-
0ad6a2aebce990c7d4a1dd717ad3908a lib/core/settings.py
52+
fe0cffe5cf3eb9de96697f8ba3f0f297 lib/core/settings.py
5353
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5454
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5555
62bc180e3e828949ffb342a8f756c183 lib/core/target.py

0 commit comments

Comments
 (0)