📅  最后修改于: 2022-03-11 14:46:12.025000             🧑  作者: Mango
#!/usr/bin/python
import socket
socket.setdefaulttimeout(2)
s = socket.socket()
target = raw_input('Target Web Server : ')
tport = 80
s.connect((target, tport))
s.send('HEAD / HEAD/1.1\nHost: ' + target + '\n\n')
print s.recv(1024)
s.close()