@@ -622,7 +622,7 @@ class _(dict):
622622 debugMsg = "got HTTP error code: %d (%s)" % (code , status )
623623 logger .debug (debugMsg )
624624
625- except (urllib2 .URLError , socket .error , socket .timeout , httplib .HTTPException , struct .error , binascii .Error , ProxyError , SqlmapCompressionException , WebSocketException , TypeError ):
625+ except (urllib2 .URLError , socket .error , socket .timeout , httplib .HTTPException , struct .error , binascii .Error , ProxyError , SqlmapCompressionException , WebSocketException , TypeError , ValueError ):
626626 tbMsg = traceback .format_exc ()
627627
628628 if checking :
@@ -660,6 +660,8 @@ class _(dict):
660660 warnMsg += " ('%s')" % match .group (1 ).strip ()
661661 elif "NTLM" in tbMsg :
662662 warnMsg = "there has been a problem with NTLM authentication"
663+ elif "Invalid header name" in tbMsg : # (e.g. PostgreSQL ::Text payload)
664+ return None , None , None
663665 elif "BadStatusLine" in tbMsg :
664666 warnMsg = "connection dropped or unknown HTTP "
665667 warnMsg += "status code received"
@@ -679,6 +681,9 @@ class _(dict):
679681 if "BadStatusLine" not in tbMsg and any ((conf .proxy , conf .tor )):
680682 warnMsg += " or proxy"
681683
684+ if silent :
685+ return None , None , None
686+
682687 with kb .locks .connError :
683688 kb .connErrorCounter += 1
684689
@@ -692,9 +697,7 @@ class _(dict):
692697 if kb .connErrorChoice is False :
693698 raise SqlmapConnectionException (warnMsg )
694699
695- if silent :
696- return None , None , None
697- elif "forcibly closed" in tbMsg :
700+ if "forcibly closed" in tbMsg :
698701 logger .critical (warnMsg )
699702 return None , None , None
700703 elif ignoreTimeout and any (_ in tbMsg for _ in ("timed out" , "IncompleteRead" )):
0 commit comments