import socket thread s1 socket socket socket AF_INET socket SOCK_STREA

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import socket, thread
s1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s1.connect( ('google.com', 80) )
thread.start_new_thread(s1.recv, (100,))
s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s2.connect( ('ya.ru', 80) )
req="HEAD / HTTP/1.0\r\n\r\n"
s2.send(req)
print s2.recv(3)
print "Hi, I'm not blocked"