2016-05-27 17:34:41 +03:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
"""
|
2017-01-02 16:19:18 +03:00
|
|
|
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
|
2016-05-27 17:34:41 +03:00
|
|
|
See the file 'doc/COPYING' for copying permission
|
|
|
|
"""
|
|
|
|
|
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
|