from mitmproxy import http def request(flow: http.HTTPFlow) -> None: # Content-Length 0 olan request body'yi kontrol et if flow.request.headers.get("Content-Length") == "0": # Yeni SOAP response body new_body = """ 2 InternetGatewayDevice.User.1.Password Xxxxx111.. InternetGatewayDevice.ManagementServer.EnableCWMP 0 InternetGatewayDevice.ManagementServer.URL http://your.acs.server.url 3 """ # Response body'yi değiştir flow.response.text = new_body # Content-Length başlığını yeni body uzunluğuna göre güncelle flow.response.headers["Content-Length"] = str(len(new_body))