Syntax error makes me scared and/or afraid

Syntax error makes me scared and/or afraid
0

#first of all HEY - I am crazy grateful to be networked with you guys
#I’m trying to understand the error of my syntaxing ways here
#any help or ridicule would be deeply deeply appreciated
#thanks

import socket
s = socket.socket()
s.settimeout(2)

target = 'google.com'
s.connect((target, 80))

req = 'HEAD / HTTP/1.1\r\nHost: ' + target '\r\n\r\n'
print 'Sending: '
print req
s.send(req)

print 'Recieved: '
print s.recv(1024)

s.close()

Welcome to the forum @HingleMC. Explain briefly what your code should do and what error output you get.

1 Like