Skip to content

Instantly share code, notes, and snippets.

@notsobad
Created January 26, 2021 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notsobad/48cc5314384ba296d9ce4ef945e0a984 to your computer and use it in GitHub Desktop.
Save notsobad/48cc5314384ba296d9ce4ef945e0a984 to your computer and use it in GitHub Desktop.
HTTP 408
# python http408.py 127.0.0.1 80 25
import socket
import time
import sys
HOST = sys.argv[1]
PORT = int(sys.argv[2])
DELAY = int(sys.argv[3])
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
#s.send("POST / HTTP/1.0\r\n")
s.send("GET / HTTP/1.0\r\n")
time.sleep(DELAY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment