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

Skip to content

Commit 62a3618

Browse files
committed
Minor patches
1 parent 366a3f9 commit 62a3618

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

extra/wafdetectify/wafdetectify.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def get_page(get=None, url=None, host=None, data=None):
4848
except Exception, ex:
4949
code = getattr(ex, "code", None)
5050
page = ex.read() if hasattr(ex, "read") else getattr(ex, "msg", "")
51+
headers = ex.info() if hasattr(ex, "info") else {}
5152

5253
result = CACHE[key] = page, headers, code
5354

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.26"
22+
VERSION = "1.2.8.27"
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ e4805169a081b834ca51a60a150c7247 extra/shutils/newlines.py
2222
1e5532ede194ac9c083891c2f02bca93 extra/sqlharvest/__init__.py
2323
b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py
2424
1e5532ede194ac9c083891c2f02bca93 extra/wafdetectify/__init__.py
25-
5a5d4305e9dd22c3ba06b8587dad9db7 extra/wafdetectify/wafdetectify.py
25+
0142de525def5e3f17092dcc1ed67c95 extra/wafdetectify/wafdetectify.py
2626
3459c562a6abb9b4bdcc36925f751f3e lib/controller/action.py
2727
7493c782345a60f6c00c9281d51a494e lib/controller/checks.py
2828
c414cecdb0472c92cf50ed5b01e4438c lib/controller/controller.py
@@ -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-
d30a78044622a9f97a2b62eec4c62e95 lib/core/settings.py
53+
fe3bc1dc84fcdfc26e552984f6c4b139 lib/core/settings.py
5454
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5555
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5656
815d1cf27f0f8738d81531e73149867d lib/core/target.py
@@ -422,7 +422,7 @@ ade1299c435db7b9e35cf1166ed9d859 waf/generic.py
422422
30ae98958fb35061d9a4145cc74c0489 waf/isaserver.py
423423
5a5c9452b9779bf39c208ebe26c98fdb waf/jiasule.py
424424
898f53c12133da3e946301f4aa97d538 waf/knownsec.py
425-
81e6bf619c7bb73c4b62e2439e60e95a waf/kona.py
425+
15a50edd48961ea168648a370f42e123 waf/kona.py
426426
b17a154fe7959619eaafffa60e14199f waf/modsecurity.py
427427
d09a50713daf3c0a2594ed4f50c57adb waf/naxsi.py
428428
bf573d01d56e585f4ad57132bc594934 waf/netcontinuum.py

waf/kona.py

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

1818
for vector in WAF_ATTACK_VECTORS:
1919
page, headers, code = get_page(get=vector)
20-
retval = code in (400, 403, 501) and re.search(r"Reference #[0-9a-f.]+", page or "", re.I) is not None
20+
retval = code in (400, 403, 501) and all(_ in (page or "") for _ in ("Access Denied", "You don't have permission to access", "on this server", "Reference"))
2121
retval |= re.search(r"AkamaiGHost", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
2222
if retval:
2323
break

0 commit comments

Comments
 (0)