You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MiaCTFer/client-1/webinfo/wafw00f/plugins/airee.py

25 lines
1002 B

2 months ago
#!/usr/bin/env python
'''
Copyright (C) 2020, WAFW00F Developers.
See the LICENSE file for copying permission.
'''
NAME = 'AireeCDN (Airee)'
def is_waf(self):
# 定义了一组用于检测是否存在特定 Web 应用防火墙WAF的方案。
# 这些方案通过检查 HTTP 响应头中的特定字段值以及响应内容中是否包含特定字符串来判断。
schemes = [
# 检查响应头中的 'Server' 字段是否为 'Airee'
self.matchHeader(('Server', 'Airee')),
# 检查响应头中的 'X-Cache' 字段是否匹配正则表达式,该正则表达式用于检测是否包含 'airee.cloud' 的不同形式
self.matchHeader(('X-Cache', r'(\w+\.)?airee\.cloud')),
# 检查响应内容中是否包含 'airee.cloud'
self.matchContent(r'airee\.cloud')
]
# 如果方案列表中的任何一个方案返回 True则表示检测到了 WAF
if any(i for i in schemes):
return True
else:
return False