File size: 508 Bytes
54f81bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python
'''
Copyright (C) 2020, WAFW00F Developers.
See the LICENSE file for copying permission.
'''

NAME = 'Incapsula (Imperva Inc.)'


def is_waf(self):
    schemes = [
        self.matchCookie(r'^incap_ses.*?='),
        self.matchCookie(r'^visid_incap.*?='),
        self.matchContent(r'incapsula incident id'),
        self.matchContent(r'powered by incapsula'),
        self.matchContent(r'/_Incapsula_Resource')
    ]
    if any(i for i in schemes):
        return True
    return False