/scoket_1.py Secret
Created
May 4, 2019 20:39
Simple Socket program in python
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 * | |
s = socket(AF_INET,SOCK_STREAM) | |
s.connect(("127.0.0.1",8888)) # Connect | |
s.send("GET /index.html HTTP/1.0\n\n") # Send request | |
data = s.recv(10000) # Get response | |
print (data) # Print the incomming data | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment