[fpc-pascal] How to list IP and MAC of network adapters on Windows?
Sven Barth
pascaldragon at googlemail.com
Fri Sep 10 09:46:11 CEST 2021
Bo Berglund via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am
Fr., 10. Sep. 2021, 09:41:
> Is there a way to enumerate the active adapters on a Windows computer with
> their
> IPv4 and MAC addresses?
>
There is an API for that, but I don't remember that right now.
> I am trying to convert a Linux reporting script to Windows, but I have a
> hard
> time finding a suitable Windows command. The script uses common Linux
> commands
> and tools to get the eth0 and wlan0 data (IPv4 and MAC addresses) and then
> to
> POST it to my website mailer (php script) via curl. See below.
>
You can use the ipconfig command and parse its output (especially ipconfig
/all).
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20210910/0e6bffc6/attachment.htm>
More information about the fpc-pascal
mailing list