Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. import socket, pyperclip
  2. myPC = socket.gethostname()
  3. hostName = ''
  4. ipEnd = 0
  5. while str(hostName[0]) != myPC:
  6. ipEnd += 1
  7. hostName = str(socket.gethostbyaddr('192.168.0.' + str(ipEnd)))
  8. pyperclip.copy('afterloop')
  9. print(ipEnd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement