Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. # encoding: utf-8
  3.  
  4. import sys
  5. import subprocess
  6. from time import sleep
  7.  
  8. try:
  9.     global myOutput
  10.     address = ['90:06:28:ca:bf:d3']
  11.     while True:
  12.         myOutput = subprocess.check_output('sudo arp-scan -l', shell=True).decode('utf-8')
  13.         print(myOutput)
  14.         print()
  15.         if address[0] in myOutput:
  16.             print("Hurray!!!  " + address[0] + " found!")
  17.         else:
  18.             print("Opps!  " + address[0] + " not found :(")
  19.         sleep(5)
  20. except:
  21.     print("Error: ", sys.exc_info()[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement