Guest User

Untitled

a guest
Nov 27th, 2018
75
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import socket
  2.  
  3. UDP_IP = "fe80::6c17:742f:315:9202"
  4. UDP_PORT = 32323
  5. MESSAGE = "TEST"
  6.  
  7. print "UDP target IP:", UDP_IP
  8. print "UDP target port:", UDP_PORT
  9. print "message:", MESSAGE
  10.  
  11. sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
  12. sock.setsockopt(socket.SOL_SOCKET, 25, "lowpan0"+'\0')
  13. sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
RAW Paste Data