dmulder / ethip

Python library that can discover an ip address from the mac address

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ethip
=====

Python library that can discover an ip address from the mac address

To install on openSUSE:

    sudo zypper ar http://download.opensuse.org/repositories/home:/dmulder/openSUSE_13.1/ ethip
    sudo zypper in ethip

To use:

    >>> from ethip import ethip
    >>> print ethip.getip('00:1E:C9:56:3C:8E', '10.5.42.255')
    10.5.42.3
    >>> print ethip.getmac('10.5.42.3')
    00:1e:c9:56:3c:8e

It needs to run as root to get full functionality. Only root has rights to make arp requests. If not run as root, you'll only get responses relative to your current arp table (arp -n).

About

Python library that can discover an ip address from the mac address

License:MIT License


Languages

Language:Python 100.0%