Created
January 26, 2021 06:39
-
-
Save notsobad/48cc5314384ba296d9ce4ef945e0a984 to your computer and use it in GitHub Desktop.
HTTP 408
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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