F
F
Flexonimus2022-04-17 18:03:59
Python
Flexonimus, 2022-04-17 18:03:59

How to get the MAC address of a router using a Python script?

Yes, I know, there are instructions on the Internet about this, but they are incompatible with Python3 in most cases! And a minority suggests that I have a MacBook with an old (not later than 2015) OS X.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AVKor, 2022-04-17
@AVKor

$ python
Python 3.10.2 (main, Mar  8 2022, 23:56:15) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from getmac import get_mac_address
>>> ip_mac = get_mac_address(ip="192.168.1.1")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question