Skip to content

Commit 0c3fbc4

Browse files
committed
Adding Approach WAF script
1 parent 107d9f9 commit 0c3fbc4

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

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.12.31"
22+
VERSION = "1.2.12.32"
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
4949
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5050
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5151
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
52-
4bfede0eaaa7ad5767de41ef849de918 lib/core/settings.py
52+
de90de0ae57ff593bb50dc6d150e2b7b lib/core/settings.py
5353
a971ce157d04de96ba6e710d3d38a9a8 lib/core/shell.py
5454
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5555
1581be48127a3a7a9fd703359b6e7567 lib/core/target.py
@@ -400,6 +400,7 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
400400
9bf2e07cdc54a661aea056223caccfb6 waf/aesecure.py
401401
a73a40d201b39f3387714c59934331e4 waf/airlock.py
402402
7da7970b45512b0233450dbd8088fde0 waf/anquanbao.py
403+
e33e11d4a8a91ade0561bb65d4d33bc6 waf/approach.py
403404
b61329e8f8bdbf5625f9520ec010af1f waf/armor.py
404405
2fe5335fde7a7f5b19d2f363a55ce805 waf/asm.py
405406
6ea7b4ff5f111acb0b24186ef82c3f2d waf/aws.py

waf/approach.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
5+
See the file 'LICENSE' for copying permission
6+
"""
7+
8+
import re
9+
10+
from lib.core.enums import HTTP_HEADER
11+
from lib.core.settings import WAF_ATTACK_VECTORS
12+
13+
__product__ = "Approach Web Application Firewall (Approach)"
14+
15+
def detect(get_page):
16+
retval = False
17+
18+
for vector in WAF_ATTACK_VECTORS:
19+
page, headers, code = get_page(get=vector)
20+
retval = re.search(r"Approach Web Application Firewall", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
21+
retval |= re.search(r"Approach(</b>)? Web Application Firewall", page or "", re.I) is not None
22+
retval |= " Your IP address has been logged and this information could be used by authorities to track you." in (page or "")
23+
retval |= all(_ in (page or "") for _ in ("Sorry for the inconvenience!", "If this was an legitimate request please contact us with details!"))
24+
if retval:
25+
break
26+
27+
return retval

0 commit comments

Comments
 (0)