nmweizi / waf_chunk

分块传输插件绕WAF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

def assemble_body(headers, body_chunks):                                                                         
    if "chunked" in headers.get("transfer-encoding", "").lower() and  'test' not in headers.get("test", "").lower():                                                                                                               
        for chunk in body_chunks:                                                                                
            if chunk:                                                                                            
                yield b"%x\r\n%s\r\n" % (len(chunk), chunk)                                                      
        yield b"0\r\n\r\n"                                                                                       
    else:                                                                                                        
        for chunk in body_chunks:                                                                                
            yield chunk      

About

分块传输插件绕WAF


Languages

Language:Python 100.0%