Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import os
- from socket import *
- from time import sleep
- s=socket(AF_INET, SOCK_DGRAM)
- s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
- while(1):
- p = os.popen("(ifconfig eth0; ifconfig wlan0)","r")
- line=""
- while 1:
- l=p.readline()
- line+=l
- if not l: break
- s.sendto(line+"\n" , ("255.255.255.255",55555))
- sleep(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement