ipinfooo


Nameipinfooo JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/ipinfooo
SummaryUses ctypes to get the IP configuration
upload_time2023-05-08 02:12:59
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMPL
keywords ctypes ip configuration
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Uses ctypes to get the IP configuration

## pip install ipinfooo

#### Tested against Windows 10 / Python 3.10 / Anaconda


I haven't written a single line of this code, and I don't know who wrote it. But I know that it is pretty useful if you need details about your network connection - Mozilla Public License, v. 2.0.

From the source code:

```python

#  For the sake of humanity here's a python script retrieving
#  ip information of the network interfaces.
#
#  Pay some tribute to my soul cause I lost a few years on this one
#
#  based on code from jaraco and many other attempts
#  on internet.
#  Fixed by <@gpotter2> from scapy's implementation to
#  add IPv6 support + fix structures
#
#  This Source Code Form is subject to the terms of the Mozilla Public
#  License, v. 2.0. If a copy of the MPL was not distributed with this
#  file, You can obtain one at http://mozilla.org/MPL/2.0/.\
#
```


```python
from ipinfooo import get_win_ifaddrs
get_win_ifaddrs()
Out[4]: 
[{'Realtek Gaming GbE Family Controller': {2: {'addr': 'xxx',
    'netmask': 'xxx',
    'broadcast': 'xx255',
    'network': '1xxxx0'}}},
 {'VirtualBox Host-Only Ethernet Adapter': {2: {'addr': '192.168.56.1',
    'netmask': '255.255.255.0',
    'broadcast': '192.168.56.255',
    'network': '192.168.56.0'},
   23: {'addr': 'xxxx',
    'netmask': 'ffff:ffff:ffff:ffff::',
    'broadcast': 'fe80::ffff:ffff:ffff:ffff',
    'network': 'fe80::'}}},
 {'Software Loopback Interface 1': {2: {'addr': '127.0.0.1',
    'netmask': '255.0.0.0',
    'broadcast': '127.255.255.255',
    'network': '127.0.0.0'},
   23: {'addr': '::1',
    'netmask': 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
    'broadcast': '::1',
    'network': '::1'}}}]
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/ipinfooo",
    "name": "ipinfooo",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "ctypes,ip,configuration",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2a/8b/95631e818e61eb48fff7b1e283e3705a2aeeddd2275a80f8fce5fa7bd5d3/ipinfooo-0.10.tar.gz",
    "platform": null,
    "description": "# Uses ctypes to get the IP configuration\r\n\r\n## pip install ipinfooo\r\n\r\n#### Tested against Windows 10 / Python 3.10 / Anaconda\r\n\r\n\r\nI haven't written a single line of this code, and I don't know who wrote it. But I know that it is pretty useful if you need details about your network connection - Mozilla Public License, v. 2.0.\r\n\r\nFrom the source code:\r\n\r\n```python\r\n\r\n#  For the sake of humanity here's a python script retrieving\r\n#  ip information of the network interfaces.\r\n#\r\n#  Pay some tribute to my soul cause I lost a few years on this one\r\n#\r\n#  based on code from jaraco and many other attempts\r\n#  on internet.\r\n#  Fixed by <@gpotter2> from scapy's implementation to\r\n#  add IPv6 support + fix structures\r\n#\r\n#  This Source Code Form is subject to the terms of the Mozilla Public\r\n#  License, v. 2.0. If a copy of the MPL was not distributed with this\r\n#  file, You can obtain one at http://mozilla.org/MPL/2.0/.\\\r\n#\r\n```\r\n\r\n\r\n```python\r\nfrom ipinfooo import get_win_ifaddrs\r\nget_win_ifaddrs()\r\nOut[4]: \r\n[{'Realtek Gaming GbE Family Controller': {2: {'addr': 'xxx',\r\n    'netmask': 'xxx',\r\n    'broadcast': 'xx255',\r\n    'network': '1xxxx0'}}},\r\n {'VirtualBox Host-Only Ethernet Adapter': {2: {'addr': '192.168.56.1',\r\n    'netmask': '255.255.255.0',\r\n    'broadcast': '192.168.56.255',\r\n    'network': '192.168.56.0'},\r\n   23: {'addr': 'xxxx',\r\n    'netmask': 'ffff:ffff:ffff:ffff::',\r\n    'broadcast': 'fe80::ffff:ffff:ffff:ffff',\r\n    'network': 'fe80::'}}},\r\n {'Software Loopback Interface 1': {2: {'addr': '127.0.0.1',\r\n    'netmask': '255.0.0.0',\r\n    'broadcast': '127.255.255.255',\r\n    'network': '127.0.0.0'},\r\n   23: {'addr': '::1',\r\n    'netmask': 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',\r\n    'broadcast': '::1',\r\n    'network': '::1'}}}]\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MPL",
    "summary": "Uses ctypes to get the IP configuration",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/ipinfooo"
    },
    "split_keywords": [
        "ctypes",
        "ip",
        "configuration"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df89e45b2dbbc9b262c22c82944c29b8dd5854aa610e740c808272f8f90e397e",
                "md5": "8f8d8fda2d76b9b53fdfd1eb60f2c590",
                "sha256": "c59bdb006fba81067b98afcc74f1b8cc8e724d8b3ecbb3c6d7abab237029dc58"
            },
            "downloads": -1,
            "filename": "ipinfooo-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8f8d8fda2d76b9b53fdfd1eb60f2c590",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12487,
            "upload_time": "2023-05-08T02:12:57",
            "upload_time_iso_8601": "2023-05-08T02:12:57.158820Z",
            "url": "https://files.pythonhosted.org/packages/df/89/e45b2dbbc9b262c22c82944c29b8dd5854aa610e740c808272f8f90e397e/ipinfooo-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a8b95631e818e61eb48fff7b1e283e3705a2aeeddd2275a80f8fce5fa7bd5d3",
                "md5": "e83867dbf1591c5bae95a89591722548",
                "sha256": "99133fbfea163deda0f35e1277d23ef0e3ea3978450f3b650c1f2fa29ce2d811"
            },
            "downloads": -1,
            "filename": "ipinfooo-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "e83867dbf1591c5bae95a89591722548",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10956,
            "upload_time": "2023-05-08T02:12:59",
            "upload_time_iso_8601": "2023-05-08T02:12:59.590625Z",
            "url": "https://files.pythonhosted.org/packages/2a/8b/95631e818e61eb48fff7b1e283e3705a2aeeddd2275a80f8fce5fa7bd5d3/ipinfooo-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-08 02:12:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "ipinfooo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "ipinfooo"
}
        
Elapsed time: 0.19221s