I'm learning ethical hacking with Python, and I have been trying to type a simple TCP client from BlackHat python book, but I have problems running the code I have written from the book.
import socket
target_host = "95.127.145.5"
target_post = 80
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((target_host,target_post))
client = send("GET / HTTP/1.1\r\nHost: 95.127.145.5\r\n\r\n")
response = client.recv(4096)
I'm not sure if it's because it's python2 but if it is, I need advice on how to convert this code to python3 because my IDE is python 3.8.3
the error happens in ("GET / HTTP/1.1\r\nHost: 95.127.145.5\r\n\r\n")
and I get the message "inspect type checker options".
Any advice is highly appreciated.