warning user in cases of "User xyz already has more than 'max_user_connections' active connections"

This commit is contained in:
Miroslav Stampar 2012-04-12 09:44:54 +00:00
parent 831f79b851
commit 052d9455fe
3 changed files with 9 additions and 1 deletions

View File

@ -608,8 +608,14 @@ def start():
finally:
showHttpErrorCodes()
if kb.maxConnectionsFlag:
warnMsg = "it appears that the target "
warnMsg += "has a maximum connections "
warnMsg += "constraint"
logger.warn(warnMsg)
if kb.dataOutputFlag and not conf.multipleTargets:
logger.info("Fetched data logged to text files under '%s'" % conf.outputPath)
logger.info("fetched data logged to text files under '%s'" % conf.outputPath)
if conf.multipleTargets and conf.resultsFilename:
infoMsg = "you can find results of scanning in multiple targets "

View File

@ -1465,6 +1465,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
kb.locks[_] = threading.Lock()
kb.matchRatio = None
kb.maxConnectionsFlag = False
kb.mergeCookies = None
kb.multiThreadMode = False
kb.negativeLogic = False

View File

@ -727,6 +727,7 @@ class Connect:
if not response and removeReflection:
page = removeReflectiveValues(page, payload)
kb.maxConnectionsFlag = re.search(r"max.+connections", page or "", re.I) is not None
kb.permissionFlag = re.search(r"(command|permission|access)\s*(was|is)?\s*denied", page or "", re.I) is not None
if content or response: