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

Skip to content

Commit 6acb248

Browse files
committed
Adding WAF script for SecureIIS
1 parent c555120 commit 6acb248

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

lib/core/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def cachedmethod(f, cache={}):
1313
"""
1414

1515
def _(*args, **kwargs):
16-
key = (f, tuple(args), frozenset(kwargs.items()))
16+
key = (f, tuple(args), str(kwargs))
1717
if key not in cache:
1818
cache[key] = f(*args, **kwargs)
1919
return cache[key]

lib/core/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ class HTTPHEADER:
152152
REFERER = "Referer"
153153
SERVER = "Server"
154154
USER_AGENT = "User-Agent"
155+
TRANSFER_ENCODING = "Transfer-Encoding"
155156

156157
class EXPECTED:
157158
BOOL = "bool"

waf/secureiis.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
Copyright (c) 2006-2013 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 HTTPHEADER
11+
12+
__product__ = "SecureIIS Web Server Security (BeyondTrust)"
13+
14+
def detect(get_page):
15+
page, headers, code = get_page()
16+
retval = code != 404
17+
page, headers, code = get_page(auxHeaders={HTTPHEADER.TRANSFER_ENCODING: 'a' * 1025, HTTPHEADER.ACCEPT_ENCODING: "identity"})
18+
retval = retval and code == 404
19+
return retval

0 commit comments

Comments
 (0)