Skip to content

Commit e0ae530

Browse files
committed
Minor improvements
1 parent bcabe55 commit e0ae530

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

data/txt/sha256sums.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ eed1db5da17eca4c65a8f999166e2246eef84397687ae820bbe4984ef65a09df extra/vulnserv
166166
4608f21a4333c162ab3c266c903fda4793cc5834de30d06affe9b7566dd09811 lib/controller/__init__.py
167167
216c9399853b7454d36dcb552baf9f1169ec7942897ddc46504684325cb6ce00 lib/core/agent.py
168168
fbba89420acafcdb9ba1a95428cf2161b13cfa2d1a7ad7d5e70c14b0e04861f0 lib/core/bigarray.py
169-
d81080a7223e3d2ffd2a063f7c5b49ab9f25294ed70a0fbdf42d0c0df3551bb3 lib/core/common.py
169+
8351843afaf565baeed4b97b45f35366f8305c4bf5f9fe1025db87782f72f916 lib/core/common.py
170170
d53a8aecab8af8b8da4dc1c74d868f70a38770d34b1fa50cae4532cae7ce1c87 lib/core/compat.py
171171
5a2607c9ffd48e6ae98fb142590ad9f588e19064fa84d6f5e662891228edc0fe lib/core/convert.py
172172
ae500647c4074681749735a4f3b17b7eca44868dd3f39f9cab0a575888ba04a1 lib/core/data.py
173173
ffae7cfe9f9afb92e887b9a8dbc1630d0063e865f35984ae417b04a4513e5024 lib/core/datatype.py
174174
38d30ecb10783f0ff58a255c801db8324ef2ac23516c7600a9e177b459d99750 lib/core/decorators.py
175175
d573a37bb00c8b65f75b275aa92549683180fb209b75fd0ff3870e3848939900 lib/core/defaults.py
176176
bb7e6521edad1cbfffa89fd7d5e255ed4ff148d984ffadbeac8d42baa2d76dea lib/core/dicts.py
177-
1e801218f301968181cb876ca27bace622b8646f041bdab72cda5d6a57542408 lib/core/dump.py
177+
2b2a680fdf238b72baa3ae07d41db2f19889719f06014f0950550e226364406f lib/core/dump.py
178178
2ca709fb52b4a1bc83cfe2acdad7e7d4dca1fee6a775e9290f0f1f517955d0b9 lib/core/enums.py
179179
00a9b29caa81fe4a5ef145202f9c92e6081f90b2a85cd76c878d520d900ad856 lib/core/exception.py
180180
1c48804c10b94da696d3470efbd25d2fff0f0bbf2af0101aaac8f8c097fce02b lib/core/gui.py
@@ -188,7 +188,7 @@ c4bfb493a03caf84dd362aec7c248097841de804b7413d0e1ecb8a90c8550bc0 lib/core/readl
188188
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
189189
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
190190
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
191-
8381dd987e4c43d9a3459843577109f501cbfb43e049dcd889167d65a3c18726 lib/core/settings.py
191+
daa549b47d1a942ffa26863483fb5d5d40b2c1b0ad4c16e92e426399e18d714a lib/core/settings.py
192192
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
193193
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
194194
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py

lib/core/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
from lib.core.log import LOGGER_HANDLER
105105
from lib.core.optiondict import optDict
106106
from lib.core.settings import BANNER
107-
from lib.core.settings import BOLD_PATTERNS
107+
from lib.core.settings import BOLD_PATTERNS_REGEX
108108
from lib.core.settings import BOUNDARY_BACKSLASH_MARKER
109109
from lib.core.settings import BOUNDED_INJECTION_MARKER
110110
from lib.core.settings import BRUTE_DOC_ROOT_PREFIXES
@@ -959,7 +959,7 @@ def boldifyMessage(message, istty=None):
959959

960960
retVal = message
961961

962-
if any(_ in message for _ in BOLD_PATTERNS):
962+
if re.search(BOLD_PATTERNS_REGEX, message):
963963
retVal = setColor(message, bold=True, istty=istty)
964964

965965
return retVal

lib/core/dump.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,12 @@ def dbTableValues(self, tableValues):
484484
dumpFP = openFile(dumpFileName, "wb" if not appendToFile else "ab", buffering=DUMP_FILE_BUFFER_SIZE)
485485

486486
count = int(tableValues["__infos__"]["count"])
487+
if count > TRIM_STDOUT_DUMP_SIZE:
488+
warnMsg = "console output will be trimmed to "
489+
warnMsg += "last %d rows due to " % TRIM_STDOUT_DUMP_SIZE
490+
warnMsg += "large table size"
491+
logger.warning(warnMsg)
492+
487493
separator = str()
488494
field = 1
489495
fields = len(tableValues) - 1
@@ -585,12 +591,6 @@ def dbTableValues(self, tableValues):
585591
elif conf.dumpFormat == DUMP_FORMAT.SQLITE:
586592
rtable.beginTransaction()
587593

588-
if count > TRIM_STDOUT_DUMP_SIZE:
589-
warnMsg = "console output will be trimmed to "
590-
warnMsg += "last %d rows due to " % TRIM_STDOUT_DUMP_SIZE
591-
warnMsg += "large table size"
592-
logger.warning(warnMsg)
593-
594594
for i in xrange(count):
595595
console = (i >= count - TRIM_STDOUT_DUMP_SIZE)
596596
field = 1

lib/core/settings.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from thirdparty import six
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.9.12.12"
22+
VERSION = "1.9.12.13"
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)
@@ -794,7 +794,10 @@
794794
CHECK_SQLITE_TYPE_THRESHOLD = 100
795795

796796
# Boldify all logger messages containing these "patterns"
797-
BOLD_PATTERNS = ("' injectable", "provided empty", "leftover chars", "might be injectable", "' is vulnerable", "is not injectable", "does not seem to be", "test failed", "test passed", "live test final result", "test shows that", "the back-end DBMS is", "created Github", "blocked by the target server", "protection is involved", "CAPTCHA", "specific response", "NULL connection is supported", "PASSED", "FAILED", "for more than", "connection to ")
797+
BOLD_PATTERNS = ("' injectable", "provided empty", "leftover chars", "might be injectable", "' is vulnerable", "is not injectable", "does not seem to be", "test failed", "test passed", "live test final result", "test shows that", "the back-end DBMS is", "created Github", "blocked by the target server", "protection is involved", "CAPTCHA", "specific response", "NULL connection is supported", "PASSED", "FAILED", "for more than", "connection to ", "will be trimmed")
798+
799+
# Regular expression used to search for bold-patterns
800+
BOLD_PATTERNS_REGEX = '|'.join(BOLD_PATTERNS)
798801

799802
# TLDs used in randomization of email-alike parameter values
800803
RANDOMIZATION_TLDS = ("com", "net", "ru", "org", "de", "uk", "br", "jp", "cn", "fr", "it", "pl", "tv", "edu", "in", "ir", "es", "me", "info", "gr", "gov", "ca", "co", "se", "cz", "to", "vn", "nl", "cc", "az", "hu", "ua", "be", "no", "biz", "io", "ch", "ro", "sk", "eu", "us", "tw", "pt", "fi", "at", "lt", "kz", "cl", "hr", "pk", "lv", "la", "pe", "au")

0 commit comments

Comments
 (0)