File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 140140from lib .core .settings import LARGE_OUTPUT_THRESHOLD
141141from lib .core .settings import LOCALHOST
142142from lib .core .settings import MIN_ENCODED_LEN_CHECK
143+ from lib .core .settings import MIN_ERROR_PARSING_NON_WRITING_RATIO
143144from lib .core .settings import MIN_TIME_RESPONSES
144145from lib .core .settings import MIN_VALID_DELAYED_RESPONSE
145146from 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
Original file line number Diff line number Diff line change 1818from 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 "
2222TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2323TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2424VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
542542# Period after last-update to start nagging about the old revision
543543LAST_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
546549CHECK_INTERNET_ADDRESS = "https://ipinfo.io/"
547550
You can’t perform that action at this time.
0 commit comments