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

Skip to content

Commit c10b282

Browse files
committed
Patch for --os-shell against Windows/MySQL where resulting \r caused trouble
1 parent c200b2c commit c10b282

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

lib/core/dump.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,15 @@ def string(self, header, data, content_type=None, sort=True):
119119
elif data is not None:
120120
_ = getUnicode(data)
121121

122-
if _ and _[-1] == '\n':
122+
if _.endswith("\r\n"):
123+
_ = _[:-2]
124+
125+
elif _.endswith("\n"):
123126
_ = _[:-1]
124127

128+
if _.strip(' '):
129+
_ = _.strip(' ')
130+
125131
if "\n" in _:
126132
self._write("%s:\n---\n%s\n---" % (header, _))
127133
else:

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.7.24"
22+
VERSION = "1.0.7.25"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

0 commit comments

Comments
 (0)