SHARE
TWEET

Untitled

a guest May 20th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import socket
  2. import struct
  3.  
  4. udp_port = 7830
  5. sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
  6. sock.connect(('localhost', udp_port))
  7. string = "#"
  8. udp_data = bytearray()
  9. udp_data.extend(string.encode())
  10. udp_data.append(8)
  11. udp_data.append(0)
  12. sock.send(udp_data)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top