|
108 | 108 | from lib.techniques.union.test import unionTest |
109 | 109 | from lib.techniques.union.use import configUnion |
110 | 110 | from thirdparty import six |
111 | | -from thirdparty.identywaf import identYwaf |
112 | 111 | from thirdparty.six.moves import http_client as _http_client |
113 | 112 |
|
114 | 113 | def checkSqlInjection(place, parameter, value): |
@@ -1403,49 +1402,22 @@ def checkWaf(): |
1403 | 1402 | kb.resendPostOnRedirect = popValue() |
1404 | 1403 | kb.redirectChoice = popValue() |
1405 | 1404 |
|
1406 | | - # TODO: today |
1407 | 1405 | if retVal: |
1408 | | - pass |
1409 | | - # identYwaf |
1410 | | - #if conf.timeout == defaults.timeout: |
1411 | | - #logger.warning("dropping timeout to %d seconds (i.e. '--timeout=%d')" % (IDS_WAF_CHECK_TIMEOUT, IDS_WAF_CHECK_TIMEOUT)) |
1412 | | - #conf.timeout = IDS_WAF_CHECK_TIMEOUT |
1413 | | - |
1414 | | - # identYwaf |
1415 | | - |
1416 | | - #def _(*args, **kwargs): |
1417 | | - #page, headers, code = None, None, None |
1418 | | - #try: |
1419 | | - #pushValue(kb.redirectChoice) |
1420 | | - #pushValue(kb.resendPostOnRedirect) |
1421 | | - |
1422 | | - #kb.redirectChoice = REDIRECTION.YES |
1423 | | - #kb.resendPostOnRedirect = True |
1424 | | - |
1425 | | - #if kwargs.get("get"): |
1426 | | - #kwargs["get"] = urlencode(kwargs["get"]) |
1427 | | - #kwargs["raise404"] = False |
1428 | | - #kwargs["silent"] = True |
1429 | | - #kwargs["finalCode"] = True |
1430 | | - |
1431 | | - #page, headers, code = Request.getPage(*args, **kwargs) |
1432 | | - #except Exception: |
1433 | | - #pass |
1434 | | - #finally: |
1435 | | - #kb.resendPostOnRedirect = popValue() |
1436 | | - #kb.redirectChoice = popValue() |
1437 | | - |
1438 | | - |
1439 | | - #message = "are you sure that you want to " |
1440 | | - #message += "continue with further target testing? [y/N] " |
1441 | | - #choice = readInput(message, default='N', boolean=True) |
1442 | | - |
1443 | | - #if not conf.tamper: |
1444 | | - #warnMsg = "please consider usage of tamper scripts (option '--tamper')" |
1445 | | - #singleTimeWarnMessage(warnMsg) |
1446 | | - |
1447 | | - #if not choice: |
1448 | | - #raise SqlmapUserQuitException |
| 1406 | + if not kb.identifiedWafs: |
| 1407 | + warnMsg = "heuristics detected that the target " |
| 1408 | + warnMsg += "is protected by some kind of WAF/IPS" |
| 1409 | + logger.critical(warnMsg) |
| 1410 | + |
| 1411 | + message = "are you sure that you want to " |
| 1412 | + message += "continue with further target testing? [y/N] " |
| 1413 | + choice = readInput(message, default='N', boolean=True) |
| 1414 | + |
| 1415 | + if not conf.tamper: |
| 1416 | + warnMsg = "please consider usage of tamper scripts (option '--tamper')" |
| 1417 | + singleTimeWarnMessage(warnMsg) |
| 1418 | + |
| 1419 | + if not choice: |
| 1420 | + raise SqlmapUserQuitException |
1449 | 1421 |
|
1450 | 1422 | hashDBWrite(HASHDB_KEYS.CHECK_WAF_RESULT, retVal, True) |
1451 | 1423 |
|
|
0 commit comments