0
votes

I need to get the Device Name, IP address, MAC address, and packets sent and received from that devices inside and outside the network. Something similar to this. lanscan

Any help please?

I have found many example for IP and MAC Adresses but none for device name. For example my Samsung galaxy s9 cell phone is connected to my wifi so I want to get its name.

1
Does this answer your question? How to get Network Interface Card names in Python?Aziz
@Aziz No, it returns IP Addresses and MAC address but not Device name. Eg my Samsung galaxy s9 cell phone is connected to my wifi so I want to get its name.Muhammad Waqas

1 Answers

-1
votes

I don't have a solution in code, but this guy does:

https://www.youtube.com/watch?v=WGJC5vT5YJo&list=PL6gx4Cwl9DGDdduy0IPDDHYnUx66Vc4ed

It's a playlist about a python sniffer which is what you want to do, but for the Device Name you can use

import socket as s

s.getfqdn("localhost") #  DESKTOP-L7B4S7M (I'm in a windows machine)

#  in localhost you put the IP