2016-05-27 17:34:41 +03:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
"""
|
|
|
|
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
|
|
|
|
See the file 'doc/COPYING' for copying permission
|
|
|
|
"""
|
|
|
|
|
|
|
|
import re
|
|
|
|
|
2016-05-31 10:49:50 +03:00
|
|
|
from lib.core.settings import IDS_WAF_CHECK_PAYLOAD
|
2016-05-27 17:34:41 +03:00
|
|
|
from lib.core.settings import WAF_ATTACK_VECTORS
|
|
|
|
|
|
|
|
__product__ = "Generic (Unknown)"
|
|
|
|
|
|
|
|
def detect(get_page):
|
|
|
|
retval = False
|
|
|
|
|
|
|
|
page, _, code = get_page()
|
|
|
|
if page is None or code >= 400:
|
|
|
|
return False
|
|
|
|
|
|
|
|
for vector in WAF_ATTACK_VECTORS:
|
|
|
|
page, _, code = get_page(get=vector)
|
|
|
|
|
2016-05-31 10:49:50 +03:00
|
|
|
if code >= 400 or IDS_WAF_CHECK_PAYLOAD in vector and code is None:
|
2016-05-27 17:34:41 +03:00
|
|
|
retval = True
|
|
|
|
break
|
|
|
|
|
|
|
|
return retval
|