mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Merge pull request #2728 from syedafzal/add_new_waf
Added identification for waf NAXSI
This commit is contained in:
commit
834ea2d0d8
|
@ -184,6 +184,7 @@ class HTTP_HEADER:
|
||||||
USER_AGENT = "User-Agent"
|
USER_AGENT = "User-Agent"
|
||||||
VIA = "Via"
|
VIA = "Via"
|
||||||
X_POWERED_BY = "X-Powered-By"
|
X_POWERED_BY = "X-Powered-By"
|
||||||
|
X_DATA_ORIGIN = "X-Data-Origin"
|
||||||
|
|
||||||
class EXPECTED:
|
class EXPECTED:
|
||||||
BOOL = "bool"
|
BOOL = "bool"
|
||||||
|
|
24
waf/naxsi.py
Normal file
24
waf/naxsi.py
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""
|
||||||
|
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
|
||||||
|
See the file 'doc/COPYING' for copying permission
|
||||||
|
"""
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
from lib.core.enums import HTTP_HEADER
|
||||||
|
from lib.core.settings import WAF_ATTACK_VECTORS
|
||||||
|
|
||||||
|
__product__ = "NAXSI (NBS System)"
|
||||||
|
|
||||||
|
def detect(get_page):
|
||||||
|
retval = False
|
||||||
|
|
||||||
|
for vector in WAF_ATTACK_VECTORS:
|
||||||
|
_, headers, _ = get_page(get=vector)
|
||||||
|
retval = re.search(r"naxsi/waf", headers.get(HTTP_HEADER.X_DATA_ORIGIN, ""), re.I) is not None
|
||||||
|
if retval:
|
||||||
|
break
|
||||||
|
|
||||||
|
return retval
|
Loading…
Reference in New Issue
Block a user