punk_fuzz.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:-PunkScan 作者: swordli 项目源码 文件源码
def fuzzworth_contentl_with_type_fallback(self, head, allowed_types_lst, full_req_match = False):
        '''This method will check the content length header strictly. If a content-length header is found
        and the content-length is below a certain amount (set in the fuzzer config) return True if either of those
        is not satisfied,. If it is not check the content-type, if the content-type is of a certain type return 
        True. If not or if content-type can't be read either, return False.'''

        #if content-length header is found return True
        if head and "content-length" in head:
            return self.fuzzworth_contentl(head, strict = True)

        #if content-length header not found, check content-type, if it is of allowed type
        #return True, otherwise false
        if head and "content-type" in head:
            return self.fuzzworth_content_type(head, allowed_types_lst, full_req_match = False, strict = True)

        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号