mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-07-11 19:13:12 +00:00
Adding support for detecting CAPTCHA
This commit is contained in:
parent
d326965966
commit
ec8cf6aadc
3 changed files with 12 additions and 1 deletions
|
|
@ -354,6 +354,15 @@ def processResponse(page, responseHeaders):
|
|||
conf.paramDict[PLACE.POST][name] = value
|
||||
conf.parameters[PLACE.POST] = re.sub("(?i)(%s=)[^&]+" % name, r"\g<1>%s" % value, conf.parameters[PLACE.POST])
|
||||
|
||||
page += "<form>\n</form><form>\ncaptcha</form>"
|
||||
if not kb.captchaDetected and re.search(r"(?i)captcha", page or ""):
|
||||
for match in re.finditer(r"(?si)<form.+?</form>", page):
|
||||
if re.search(r"(?i)captcha", match.group(0)):
|
||||
kb.captchaDetected = True
|
||||
errMsg = "potential CAPTCHA protection mechanism detected"
|
||||
singleTimeLogMessage(errMsg, logging.ERROR)
|
||||
break
|
||||
|
||||
if re.search(BLOCKED_IP_REGEX, page):
|
||||
errMsg = "it appears that you have been blocked by the target server"
|
||||
singleTimeLogMessage(errMsg, logging.ERROR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue