📜  横幅抓取器 api - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:12.025000             🧑  作者: Mango

代码示例1
#!/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()