Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aefb815

Browse files
committed
Cutting down FP on Varnish WAF (ignoring Varnish Cache)
1 parent 014978c commit aefb815

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.2.8.29"
22+
VERSION = "1.2.8.30"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
5050
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5151
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5252
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
53-
06f18a0602e49a4b14f4096feea04e4b lib/core/settings.py
53+
b5062827268f92056e6f87e3e03df5f6 lib/core/settings.py
5454
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5555
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5656
815d1cf27f0f8738d81531e73149867d lib/core/target.py
@@ -449,7 +449,7 @@ dffa9cebad777308714aaf83b71635b4 waf/teros.py
449449
b37210459a13de40bf07722c4d032c33 waf/trafficshield.py
450450
fe01932df9acea7f6d23f03c6b698646 waf/urlscan.py
451451
a687449cd4e45f69e33b13d41e021480 waf/uspses.py
452-
f3a81da13ee098e94edd965ea4b37b04 waf/varnish.py
452+
ab329be0231efdd360ebabd24c0e5315 waf/varnish.py
453453
20840afc269920826deac2b6c00d6b9c waf/wallarm.py
454454
11205abf397ae9072adc3234b656ade9 waf/watchguard.py
455455
9bf34539f382987490d2239d8ef0a651 waf/webappsecure.py

waf/varnish.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ def detect(get_page):
1717

1818
for vector in WAF_ATTACK_VECTORS:
1919
page, headers, code = get_page(get=vector)
20-
retval = headers.get("X-Varnish") is not None
21-
retval |= re.search(r"varnish\Z", headers.get(HTTP_HEADER.VIA, ""), re.I) is not None
22-
retval |= re.search(r"varnish", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
23-
retval |= code == 404 and re.search(r"\bXID: \d+", page or "") is not None
20+
retval = code == 404 and re.search(r"\bXID: \d+", page or "") is not None
2421
retval |= code >= 400 and "Request rejected by xVarnish-WAF" in (page or "")
2522
if retval:
2623
break

0 commit comments

Comments
 (0)