mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Adding a new WAF script (varnish.py)
This commit is contained in:
parent
3ff01f5777
commit
abd76081e1
|
@ -6,6 +6,9 @@ Andres Tarasco Acuna, <atarasco@gmail.com>
|
||||||
Santiago Accurso, <saccurso@skygear.com.ar>
|
Santiago Accurso, <saccurso@skygear.com.ar>
|
||||||
* for reporting a bug
|
* for reporting a bug
|
||||||
|
|
||||||
|
Syed Afzal, <syed@syedafzal.in>
|
||||||
|
* for contributing a WAF script varnish.py
|
||||||
|
|
||||||
Zaki Akhmad, <zakiakhmad@gmail.com>
|
Zaki Akhmad, <zakiakhmad@gmail.com>
|
||||||
* for suggesting a couple of features
|
* for suggesting a couple of features
|
||||||
|
|
||||||
|
@ -303,7 +306,7 @@ Michael Majchrowicz, <mmajchrowicz@gmail.com>
|
||||||
* for suggesting a lot of ideas and features
|
* for suggesting a lot of ideas and features
|
||||||
|
|
||||||
Ahmad Maulana, <matdhule@gmail.com>
|
Ahmad Maulana, <matdhule@gmail.com>
|
||||||
* for contributing one tamper script, halfversionedmorekeywords.py
|
* for contributing a tamper script halfversionedmorekeywords.py
|
||||||
|
|
||||||
Ferruh Mavituna, <ferruh@mavituna.com>
|
Ferruh Mavituna, <ferruh@mavituna.com>
|
||||||
* for exchanging ideas on the implementation of a couple of features
|
* for exchanging ideas on the implementation of a couple of features
|
||||||
|
|
25
waf/varnish.py
Normal file
25
waf/varnish.py
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""
|
||||||
|
Copyright (c) 2006-2013 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__ = "Varnish FireWall (OWASP) "
|
||||||
|
|
||||||
|
def detect(get_page):
|
||||||
|
retval = False
|
||||||
|
|
||||||
|
for vector in WAF_ATTACK_VECTORS:
|
||||||
|
page, headers, code = get_page(get=vector)
|
||||||
|
retval = headers.get("X-Varnish") is not None
|
||||||
|
retval |= re.search(r"varnish\Z", headers.get(HTTP_HEADER.VIA, ""), re.I) is not None
|
||||||
|
if retval:
|
||||||
|
break
|
||||||
|
|
||||||
|
return retval
|
Loading…
Reference in New Issue
Block a user