diff --git a/lib/core/settings.py b/lib/core/settings.py index 4a9deb4cb..ca4fc9d3d 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -287,17 +287,20 @@ REFLECTED_VALUE_MARKER = '__REFLECTED_VALUE__' # Regular expression used for marking non-alphanum characters REFLECTED_NON_ALPHA_NUM_REGEX = r'[^<>\\r\\n]+?' -# chars which can be used as a failsafe values in case of too long URL encoding value +# Chars which can be used as a failsafe values in case of too long URL encoding value URLENCODE_FAILSAFE_CHARS = '()|,' -# maximum length of urlencoded value after which failsafe procedure takes away +# Maximum length of urlencoded value after which failsafe procedure takes away URLENCODE_CHAR_LIMIT = 2000 -# default schema for Microsoft SQL Server DBMS +# Default schema for Microsoft SQL Server DBMS DEFAULT_MSSQL_SCHEMA = 'dbo' -# display hash attack info every mod number of items +# Display hash attack info every mod number of items HASH_MOD_ITEM_DISPLAY = 1117 -# maximum integer value +# Maximum integer value MAX_INT = sys.maxint + +# Length of entry info for partial inband technique +PARTIAL_INBAND_STATUS_LENGTH = 10 diff --git a/lib/techniques/inband/union/use.py b/lib/techniques/inband/union/use.py index 2700ce963..b6b06f869 100644 --- a/lib/techniques/inband/union/use.py +++ b/lib/techniques/inband/union/use.py @@ -31,6 +31,7 @@ from lib.core.enums import DBMS from lib.core.enums import PAYLOAD from lib.core.exception import sqlmapSyntaxException from lib.core.settings import FROM_TABLE +from lib.core.settings import PARTIAL_INBAND_STATUS_LENGTH from lib.core.unescaper import unescaper from lib.request.connect import Connect as Request from lib.utils.resume import resume @@ -252,7 +253,8 @@ def unionUse(expression, unpack=True, dump=False): if conf.verbose == 1: length = stopLimit - startLimit count = num - startLimit + 1 - status = '%d/%d entries (%d%s)' % (count, length, round(100.0*count/length), '%') + items = output.replace(kb.misc.start, "").replace(kb.misc.stop, "").split(kb.misc.delimiter) + status = '%d/%d entries (%d%s) [%s...]' % (count, length, round(100.0*count/length), '%', ",".join(items)[:PARTIAL_INBAND_STATUS_LENGTH].ljust(PARTIAL_INBAND_STATUS_LENGTH, '.')) dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), status), True) if conf.verbose == 1: