#!/usr/bin/env python
import time
import socket
addr=('10.9.255.255',123)
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
addr1=('10.5.255.255',123)
s1=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
payload=[0x25,0x04,0x04,0xef,0x00,0x00,
         0x00,0x00,0x00,0x00,0x02,0xa2,0x7f,0x7f,
         0x01,0x01,0xdb,0x00,0x06,0xce,0x48,0x81,
         0xb2,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0xdb,0x00,0x06,0xd1,0x48,0x81,
         0xa1,0x55]
payload1=[0x25,0x04,0x04,0xef,0x00,0x00,
         0x00,0x00,0x00,0x00,0x02,0xa2,0x7f,0x7f,
         0x01,0x01,0xdb,0x00,0x06,0xce,0x48,0x81,
         0xb2,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0xdb,0x00,0x06,0xd1,0x48,0x88,
         0x2f,0x0e]

data=list()
data1=list()
for i in payload:
    data.append(chr(int(i)))
    data1.append(chr(int(i)))
data=''.join(data)
data1=''.join(data1)
while 1:
 time.sleep(1)
 
 #print type(data)
 if not data:
  break
 s.sendto(data,addr)
 s1.sendto(data1,addr1)
s.close()
