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

Skip to content

Commit d6bcbba

Browse files
committed
Minor patch for E technique to be more compatible with output of U technique
1 parent 04b3aef commit d6bcbba

2 files changed

Lines changed: 9 additions & 2 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.5.64"
22+
VERSION = "1.0.5.65"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

lib/techniques/error/use.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from lib.core.common import dataToStdout
1717
from lib.core.common import decodeHexValue
1818
from lib.core.common import extractRegexResult
19+
from lib.core.common import getConsoleWidth
1920
from lib.core.common import getPartRun
2021
from lib.core.common import getUnicode
2122
from lib.core.common import hashDBRetrieve
@@ -203,6 +204,7 @@ def _errorFields(expression, expressionFields, expressionFieldsList, num=None, e
203204
values = []
204205
origExpr = None
205206

207+
width = getConsoleWidth()
206208
threadData = getCurrentThreadData()
207209

208210
for field in expressionFieldsList:
@@ -229,7 +231,12 @@ def _errorFields(expression, expressionFields, expressionFieldsList, num=None, e
229231
if kb.fileReadMode and output and output.strip():
230232
print
231233
elif output is not None and not (threadData.resumed and kb.suppressResumeInfo) and not (emptyFields and field in emptyFields):
232-
dataToStdout("[%s] [INFO] %s: %s\n" % (time.strftime("%X"), "resumed" if threadData.resumed else "retrieved", output if kb.safeCharEncode else safecharencode(output)))
234+
status = "[%s] [INFO] %s: %s" % (time.strftime("%X"), "resumed" if threadData.resumed else "retrieved", output if kb.safeCharEncode else safecharencode(output))
235+
236+
if len(status) > width:
237+
status = "%s..." % status[:width - 3]
238+
239+
dataToStdout("%s\n" % status, True)
233240

234241
if isinstance(num, int):
235242
expression = origExpr

0 commit comments

Comments
 (0)