daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Sep 19th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python
  2. import os
  3. from socket import *
  4. from time import sleep
  5.  
  6. s=socket(AF_INET, SOCK_DGRAM)
  7. s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
  8. while(1):
  9.     p = os.popen("(ifconfig eth0; ifconfig wlan0)","r")
  10.     line=""
  11.     while 1:
  12.     l=p.readline()
  13.     line+=l
  14.         if not l: break
  15.     s.sendto(line+"\n" , ("255.255.255.255",55555))
  16.     sleep(10)
RAW Paste Data
Top