Minor update to #3326 (adding generic code >= 400)

This commit is contained in:
Miroslav Stampar 2018-10-29 09:55:14 +01:00
parent cc4833429f
commit db5ae9ae0b
3 changed files with 5 additions and 7 deletions

View File

@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.2.10.38" VERSION = "1.2.10.39"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -49,7 +49,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py 0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
fcb74fcc9577523524659ec49e2e964b lib/core/session.py fcb74fcc9577523524659ec49e2e964b lib/core/session.py
dc1382ae6b5899619d11d972435c6bd2 lib/core/settings.py 052f65076ec02852b0035f1ac0d20240 lib/core/settings.py
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
721198b5be72c8015a02acb116532a1f lib/core/target.py 721198b5be72c8015a02acb116532a1f lib/core/target.py
@ -408,6 +408,7 @@ ef722d062564def381b1f96f5faadee3 waf/baidu.py
44f724ab7d333397975fecdf7e50be56 waf/bigip.py 44f724ab7d333397975fecdf7e50be56 waf/bigip.py
6a2834daf767491d3331bd31e946d540 waf/binarysec.py 6a2834daf767491d3331bd31e946d540 waf/binarysec.py
41e399dbfe7b904d5aacfb37d85e1fbf waf/blockdos.py 41e399dbfe7b904d5aacfb37d85e1fbf waf/blockdos.py
c52c6974c0dae6815f27cfdee6121d7b waf/chinacache.py
2f3bbf43be94d4e9ffe9f80e8483d62f waf/ciscoacexml.py 2f3bbf43be94d4e9ffe9f80e8483d62f waf/ciscoacexml.py
ba84f296cb52f5e78a0670b98d7763fa waf/cloudbric.py ba84f296cb52f5e78a0670b98d7763fa waf/cloudbric.py
a1d16d7106c9c66072aa58530c288515 waf/cloudflare.py a1d16d7106c9c66072aa58530c288515 waf/cloudflare.py

View File

@ -5,19 +5,16 @@ Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission 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 from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "China Cache" __product__ = "ChinaCache (ChinaCache Networks)"
def detect(get_page): def detect(get_page):
retval = False retval = False
for vector in WAF_ATTACK_VECTORS: for vector in WAF_ATTACK_VECTORS:
page, headers, code = get_page(get=vector) page, headers, code = get_page(get=vector)
retval = headers.get("Powered-By-ChinaCache") is not None retval = code >= 400 and headers.get("Powered-By-ChinaCache") is not None
if retval: if retval:
break break