Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- HOST ='10.1.89.130'
- PORT = 3128
- DATA = 'GET /min_balance8 HTTP/1.1\r\nHost: 123.xl.co.id\r\n\r\n'
- def tcp_client():
- client = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
- client.connect(( HOST, PORT ))
- client.send(DATA)
- response = client.recv(4096)
- print response
- if __name__ == '__main__':
- tcp_client()
Add Comment
Please, Sign In to add comment