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

Skip to content

Commit 1c2dec0

Browse files
committed
'Calling Travis'
1 parent 677dd20 commit 1c2dec0

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

lib/core/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
from lib.core.settings import LARGE_OUTPUT_THRESHOLD
141141
from lib.core.settings import LOCALHOST
142142
from lib.core.settings import MIN_ENCODED_LEN_CHECK
143+
from lib.core.settings import MIN_ERROR_PARSING_NON_WRITING_RATIO
143144
from lib.core.settings import MIN_TIME_RESPONSES
144145
from lib.core.settings import MIN_VALID_DELAYED_RESPONSE
145146
from lib.core.settings import NETSCAPE_FORMAT_HEADER_COOKIES
@@ -2659,7 +2660,7 @@ def extractErrorMessage(page):
26592660

26602661
if match:
26612662
candidate = htmlUnescape(match.group("result")).replace("<br>", "\n").strip()
2662-
if re.search(r"\b([a-z]+ ){5}", candidate) is not None: # check for legitimate (e.g. Warning:...) text
2663+
if (1.0 * len(re.findall(r"[^A-Za-z,. ]", candidate))) / len(candidate) > MIN_ERROR_PARSING_NON_WRITING_RATIO:
26632664
retVal = candidate
26642665
break
26652666

lib/core/settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.6.23"
21+
VERSION = "1.3.6.24"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
@@ -542,6 +542,9 @@
542542
# Period after last-update to start nagging about the old revision
543543
LAST_UPDATE_NAGGING_DAYS = 60
544544

545+
# Minimum non-writing chars (e.g. ['"-:/]) ratio in case of parsed error messages
546+
MIN_ERROR_PARSING_NON_WRITING_RATIO = 0.05
547+
545548
# Generic address for checking the Internet connection while using switch --check-internet
546549
CHECK_INTERNET_ADDRESS = "https://ipinfo.io/"
547550

0 commit comments

Comments
 (0)