Scan network and grab details of hosts found

hi all,

is there a python tool like nmap/arp that gets all the info of hosts like

ip
mac
make/model
serial/part number
hostname
OS name

i thought i would use a python tool as i could call a subprocess powershell if its a windows host and then get more info about it

thanks,
rob

Using subprocess and re might be the best way to go here, unless you’re interested in reimplementing those tools in Python. On pypi I found this which seems to wrap nmap: python-nmap · PyPI

isnt re regex?

Yes. What I meant was, use subprocess to run nmap and then use regular expressions to parse the strings it returns to collect the information you want.

can nmap or arp get make/model of the host ie HP 840G4

I’m just brainstorming here. These have not been tested.

  1. I would search Youtube for videos from the past year and see what comes up. Or I would search the internet for sites in the past year as well.
  2. This Python module might also help. An introduction to the ipaddress module — Python 3.12.4 documentation
  3. Extracting MAC address using uuid. Extracting MAC address using Python

This isn’t a Python question. Do you know how you’re actually planning to do the scan? If not, use existing tools, and just use Python to parse their output - which means, the first step is to understand the tools you’re using.

yes nmap and arp i know are other tools but i thought python would come with its own network tools for this but im guessing not ?