Regularly browse other computers on the network in Python

Is it possible to view other devices located on the same network in Python (or any programming language)?

Edit: to clarify, what I would like to do (just for starters) is to display a list of connected devices and their local IP addresses. So, on my router it will show information:

family_pc, 192.168.1.2 work_laptop, 192.168.1.3

I want to get this information.

+3
source share
3 answers

What are you trying to do for sure?

nmap - , , , . python-nmap, nmap Python.

, , , .

+7

.

, . .

, , DNS-SD/Zeroconf (aka Bonjour). Linux Mac , . Windows DNS-SD, .

DNS-SD python . Linux, MacOS Windows.

Microsoft, UPnP, , .

+3

, Netresview, Windows, . .

os.system('NetResView.exe /DisplayComputers 1 /RetrieveIPAddresses /stext ipfile')
my_file = open('ipfile')
for line in my_file :
    print myfile.readline()
-1

Source: https://habr.com/ru/post/1754324/


All Articles