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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#!/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