#!/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 Host: ' + target + ' ') print s.recv(1024) s.close()