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

Skip to content

Commit a45a90d

Browse files
committed
Adding new WAF script (Yunsuo)
1 parent ec1ac81 commit a45a90d

3 files changed

Lines changed: 28 additions & 2 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.8.17"
22+
VERSION = "1.0.8.18"
2323
REVISION = getRevisionNumber()
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}

txt/checksum.md5

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
c857eea31beebb5aac5719c2329bbaf3 lib/core/settings.py
48+
636be763d8ddac748b6455f732b711ce lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py
@@ -426,6 +426,7 @@ b5ea5375df444e0240f1ee0e2a8e52fb waf/trafficshield.py
426426
7a723ce2f1b82d7297a2ab025d5ca0be waf/webappsecure.py
427427
75e51fea7f206e8faa2f743e44e58383 waf/webknight.py
428428
3bcac085dcd9ed26b50a2320e418e9f3 waf/yundun.py
429+
2a57f322f0b6e7b11b8df0909816a34f waf/yunsuo.py
429430
2d53fdaca0d7b42edad5192661248d76 xml/banner/cookie.xml
430431
37603bc0905af0c65480a2ca959990ec xml/banner/generic.xml
431432
d8925c034263bf1b83e7d8e1c78eec57 xml/banner/mssql.xml

waf/yunsuo.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
5+
See the file 'doc/COPYING' 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__ = "Yunsuo Web Application Firewall (Yunsuo)"
14+
15+
def detect(get_page):
16+
retval = False
17+
18+
for vector in WAF_ATTACK_VECTORS:
19+
page, headers, _ = get_page(get=vector)
20+
retval = re.search(r"<img class=\"yunsuologo\"", page, re.I) is not None
21+
retval |= re.search(r"yunsuo_session", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
22+
if retval:
23+
break
24+
25+
return retval

0 commit comments

Comments
 (0)