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

Skip to content

Commit 5aab2d8

Browse files
committed
Update for Akamai Kona WAF script
1 parent 210b65c commit 5aab2d8

2 files changed

Lines changed: 5 additions & 3 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.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.5.75"
22+
VERSION = "1.0.5.77"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

waf/kona.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import re
99

10+
from lib.core.enums import HTTP_HEADER
1011
from lib.core.settings import WAF_ATTACK_VECTORS
1112

1213
__product__ = "KONA Security Solutions (Akamai Technologies)"
@@ -15,8 +16,9 @@ def detect(get_page):
1516
retval = False
1617

1718
for vector in WAF_ATTACK_VECTORS:
18-
page, _, code = get_page(get=vector)
19-
retval = code in (400, 501) and re.search(r"Reference #[0-9A-Fa-f.]+", page, re.I) is not None
19+
page, headers, code = get_page(get=vector)
20+
retval = code in (400, 403, 501) and re.search(r"Reference #[0-9A-Fa-f.]+", page, re.I) is not None
21+
retval |= re.search(r"AkamaiGHost", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
2022
if retval:
2123
break
2224

0 commit comments

Comments
 (0)