Last active
November 1, 2016 00:07
-
-
Save bongbongco/3aa1a6d033f8138d7dea084406bb14a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from socket import * | |
HOST = "google.com" | |
PORT = 80 | |
bypassSocket = socket(AF_INET, SOCK_STREAM) | |
bypassSocket.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) | |
bypassSocket.connect((HOST, PORT)) | |
packet = [] | |
packet.append("GET / HTTP/1.1\r\n") | |
packet.append("HOST: google.com\r\n") | |
packet.append("User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64)\r\n\r\n") | |
for packetLine in packet: | |
bypassSocket.send(packetLine) | |
print bypassSocket.recv(102400) | |
bypassSocket.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment