py-wifi-helper


Namepy-wifi-helper JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/changyy/py-wifi-helper
SummaryWIFI Helper
upload_time2023-08-19 12:01:00
maintainer
docs_urlNone
authorYuan-Yi Chang
requires_python>=3.10
license
keywords python wifi interface macos ubuntu
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # py-wifi-helper

This is a Python tool/library developed for macOS 13.5 and Ubuntu 22.04, primarily providing operations for wireless interfaces. It includes functionalities such as listing available wireless interfaces, scanning for WiFi signals using a specified wireless interface, connecting a chosen wireless interface to a specific WiFi access point, retrieving information about the connected WiFi access points for the specified wireless interface, and disconnecting the specified wireless interface.

# Usage

```
% py-wifi-helper --help
usage: py-wifi-helper [-h] [--action {device,scan,connect,disconnect}] [--device DEVICE] [--ssid SSID] [--password PASSWORD]

options:
  -h, --help            show this help message and exit
  --action {device,scan,connect,disconnect}
                        command action
  --device DEVICE       interface
  --ssid SSID           ssid
  --password PASSWORD   password
```

## Ubuntu

```
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy

$ sudo py-wifi-helper
{
    "version": "1.0.0",
    "device": {
        "default": "wlxd1234567890",
        "list": [
            "wlxd1234567890"
        ],
        "error": null,
        "select": "wlxd1234567890"
    },
    "connection": {
        "default": {
            "ssid": null,
            "log": null
        },
        "wlxd1234567890": {
            "ssid": null,
            "log": null
        }
    },
    "action": {
        "name": "device",
        "status": true,
        "error": null,
        "log": null
    }
}
```

## macOS

```
% sw_vers
ProductName:		macOS
ProductVersion:		13.5
BuildVersion:		22G74

% py-wifi-helper
{
    "version": "1.0.0",
    "device": {
        "default": "en0",
        "list": [
            "en0"
        ],
        "error": null,
        "select": "en0"
    },
    "connection": {
        "default": {
            "ssid": "MyHomeWIFIAP",
            "log": null
        },
        "en0": {
            "ssid": "MyHomeWIFIAP",
            "log": null
        }
    },
    "action": {
        "name": "device",
        "status": true,
        "error": null,
        "log": null
    }
}
```


### macos - Scan

```
% py-wifi-helper --action scan
{
    "version": "1.0.0",
    "device": {
        "default": "en0",
        "list": [
            "en0"
        ],
        "error": null,
        "select": "en0"
    },
    "connection": {
        "default": {
            "ssid": "MyHomeWIFIAP",
            "log": null
        },
        "en0": {
            "ssid": "MyHomeWIFIAP",
            "log": null
        }
    },
    "action": {
        "name": "scan",
        "status": true,
        "error": null,
        "log": null
    },
    "ssid": [
        "SSID01",
        "SSID02",
        "SSID03",
        "SSID04",
        "SSID05",
        "SSID06",
        "SSID07",
        "SSID08"
    ]
}
```

### macOS - Scan with DeviceID `xxxx` (not found):

```
% py-wifi-helper --action scan --device xxxx
{
    "version": "1.0.0",
    "device": {
        "default": "en0",
        "list": [
            "en0"
        ],
        "error": null,
        "select": "xxxx"
    },
    "connection": {
        "default": {
            "ssid": null,
            "log": null
        },
        "en0": {
            "ssid": "MyHomeWIFIAP",
            "log": null
        }
    },
    "action": {
        "name": "scan",
        "status": false,
        "error": [
            "interface not found: xxxx, current: ['en0']"
        ],
        "log": null
    },
    "ssid": []
}
```

---

### macOS - disconnect

```
% py-wifi-helper --action disconnect --device en0
{
    "version": "1.0.0",
    "device": {
        "default": "en0",
        "list": [
            "en0"
        ],
        "error": null,
        "select": "en0"
    },
    "connection": {
        "default": {
            "ssid": null,
            "log": null
        },
        "en0": {
            "ssid": null,
            "log": null
        }
    },
    "action": {
        "name": "disconnect",
        "status": true,
        "error": null,
        "log": null
    }
}
```

---

### macOS - Connect

```
% py-wifi-helper --action connect --device en0 --ssid MyHomeWIFIAP --password 12345678
{
    "version": "1.0.0",
    "device": {
        "default": "en0",
        "list": [
            "en0"
        ],
        "error": null,
        "select": "en0"
    },
    "connection": {
        "default": {
            "ssid": "MyHomeWIFIAP",
            "log": null
        },
        "en0": {
            "ssid": "MyHomeWIFIAP",
            "log": null
        }
    },
    "action": {
        "name": "connect",
        "status": true,
        "error": null,
        "log": null
    }
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/changyy/py-wifi-helper",
    "name": "py-wifi-helper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "python,wifi,interface,macos,ubuntu",
    "author": "Yuan-Yi Chang",
    "author_email": "<changyy.csie@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/79/4f/74f666ccd0e19460e5905ad0c14fbf1a391b62f10ac602defd1eaf07ab05/py-wifi-helper-1.0.0.tar.gz",
    "platform": null,
    "description": "# py-wifi-helper\n\nThis is a Python tool/library developed for macOS 13.5 and Ubuntu 22.04, primarily providing operations for wireless interfaces. It includes functionalities such as listing available wireless interfaces, scanning for WiFi signals using a specified wireless interface, connecting a chosen wireless interface to a specific WiFi access point, retrieving information about the connected WiFi access points for the specified wireless interface, and disconnecting the specified wireless interface.\n\n# Usage\n\n```\n% py-wifi-helper --help\nusage: py-wifi-helper [-h] [--action {device,scan,connect,disconnect}] [--device DEVICE] [--ssid SSID] [--password PASSWORD]\n\noptions:\n  -h, --help            show this help message and exit\n  --action {device,scan,connect,disconnect}\n                        command action\n  --device DEVICE       interface\n  --ssid SSID           ssid\n  --password PASSWORD   password\n```\n\n## Ubuntu\n\n```\n$ lsb_release -a\nNo LSB modules are available.\nDistributor ID:\tUbuntu\nDescription:\tUbuntu 22.04.3 LTS\nRelease:\t22.04\nCodename:\tjammy\n\n$ sudo py-wifi-helper\n{\n    \"version\": \"1.0.0\",\n    \"device\": {\n        \"default\": \"wlxd1234567890\",\n        \"list\": [\n            \"wlxd1234567890\"\n        ],\n        \"error\": null,\n        \"select\": \"wlxd1234567890\"\n    },\n    \"connection\": {\n        \"default\": {\n            \"ssid\": null,\n            \"log\": null\n        },\n        \"wlxd1234567890\": {\n            \"ssid\": null,\n            \"log\": null\n        }\n    },\n    \"action\": {\n        \"name\": \"device\",\n        \"status\": true,\n        \"error\": null,\n        \"log\": null\n    }\n}\n```\n\n## macOS\n\n```\n% sw_vers\nProductName:\t\tmacOS\nProductVersion:\t\t13.5\nBuildVersion:\t\t22G74\n\n% py-wifi-helper\n{\n    \"version\": \"1.0.0\",\n    \"device\": {\n        \"default\": \"en0\",\n        \"list\": [\n            \"en0\"\n        ],\n        \"error\": null,\n        \"select\": \"en0\"\n    },\n    \"connection\": {\n        \"default\": {\n            \"ssid\": \"MyHomeWIFIAP\",\n            \"log\": null\n        },\n        \"en0\": {\n            \"ssid\": \"MyHomeWIFIAP\",\n            \"log\": null\n        }\n    },\n    \"action\": {\n        \"name\": \"device\",\n        \"status\": true,\n        \"error\": null,\n        \"log\": null\n    }\n}\n```\n\n\n### macos - Scan\n\n```\n% py-wifi-helper --action scan\n{\n    \"version\": \"1.0.0\",\n    \"device\": {\n        \"default\": \"en0\",\n        \"list\": [\n            \"en0\"\n        ],\n        \"error\": null,\n        \"select\": \"en0\"\n    },\n    \"connection\": {\n        \"default\": {\n            \"ssid\": \"MyHomeWIFIAP\",\n            \"log\": null\n        },\n        \"en0\": {\n            \"ssid\": \"MyHomeWIFIAP\",\n            \"log\": null\n        }\n    },\n    \"action\": {\n        \"name\": \"scan\",\n        \"status\": true,\n        \"error\": null,\n        \"log\": null\n    },\n    \"ssid\": [\n        \"SSID01\",\n        \"SSID02\",\n        \"SSID03\",\n        \"SSID04\",\n        \"SSID05\",\n        \"SSID06\",\n        \"SSID07\",\n        \"SSID08\"\n    ]\n}\n```\n\n### macOS - Scan with DeviceID `xxxx` (not found):\n\n```\n% py-wifi-helper --action scan --device xxxx\n{\n    \"version\": \"1.0.0\",\n    \"device\": {\n        \"default\": \"en0\",\n        \"list\": [\n            \"en0\"\n        ],\n        \"error\": null,\n        \"select\": \"xxxx\"\n    },\n    \"connection\": {\n        \"default\": {\n            \"ssid\": null,\n            \"log\": null\n        },\n        \"en0\": {\n            \"ssid\": \"MyHomeWIFIAP\",\n            \"log\": null\n        }\n    },\n    \"action\": {\n        \"name\": \"scan\",\n        \"status\": false,\n        \"error\": [\n            \"interface not found: xxxx, current: ['en0']\"\n        ],\n        \"log\": null\n    },\n    \"ssid\": []\n}\n```\n\n---\n\n### macOS - disconnect\n\n```\n% py-wifi-helper --action disconnect --device en0\n{\n    \"version\": \"1.0.0\",\n    \"device\": {\n        \"default\": \"en0\",\n        \"list\": [\n            \"en0\"\n        ],\n        \"error\": null,\n        \"select\": \"en0\"\n    },\n    \"connection\": {\n        \"default\": {\n            \"ssid\": null,\n            \"log\": null\n        },\n        \"en0\": {\n            \"ssid\": null,\n            \"log\": null\n        }\n    },\n    \"action\": {\n        \"name\": \"disconnect\",\n        \"status\": true,\n        \"error\": null,\n        \"log\": null\n    }\n}\n```\n\n---\n\n### macOS - Connect\n\n```\n% py-wifi-helper --action connect --device en0 --ssid MyHomeWIFIAP --password 12345678\n{\n    \"version\": \"1.0.0\",\n    \"device\": {\n        \"default\": \"en0\",\n        \"list\": [\n            \"en0\"\n        ],\n        \"error\": null,\n        \"select\": \"en0\"\n    },\n    \"connection\": {\n        \"default\": {\n            \"ssid\": \"MyHomeWIFIAP\",\n            \"log\": null\n        },\n        \"en0\": {\n            \"ssid\": \"MyHomeWIFIAP\",\n            \"log\": null\n        }\n    },\n    \"action\": {\n        \"name\": \"connect\",\n        \"status\": true,\n        \"error\": null,\n        \"log\": null\n    }\n}\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "WIFI Helper",
    "version": "1.0.0",
    "project_urls": {
        "Download": "https://pypi.org/project/py-wifi-helper/",
        "Homepage": "https://github.com/changyy/py-wifi-helper"
    },
    "split_keywords": [
        "python",
        "wifi",
        "interface",
        "macos",
        "ubuntu"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ada397bd382b898af2ea3ab86296b48485cbee6dd63647ead1f5e3be3feb0c22",
                "md5": "5e89816ab660756611e14d19c612e4d7",
                "sha256": "e3c9a104ef7325a3a794a20c60d13ea23da29457cf34ab2e2a3b9a7d1276227b"
            },
            "downloads": -1,
            "filename": "py_wifi_helper-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e89816ab660756611e14d19c612e4d7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 11842,
            "upload_time": "2023-08-19T12:00:58",
            "upload_time_iso_8601": "2023-08-19T12:00:58.949869Z",
            "url": "https://files.pythonhosted.org/packages/ad/a3/97bd382b898af2ea3ab86296b48485cbee6dd63647ead1f5e3be3feb0c22/py_wifi_helper-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "794f74f666ccd0e19460e5905ad0c14fbf1a391b62f10ac602defd1eaf07ab05",
                "md5": "cf30863709e6e32c128cee5e91eb6e2a",
                "sha256": "bd6524c00bbf5a96442878348ae605073d767768d56556a3abf79c153fede307"
            },
            "downloads": -1,
            "filename": "py-wifi-helper-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cf30863709e6e32c128cee5e91eb6e2a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 10976,
            "upload_time": "2023-08-19T12:01:00",
            "upload_time_iso_8601": "2023-08-19T12:01:00.639596Z",
            "url": "https://files.pythonhosted.org/packages/79/4f/74f666ccd0e19460e5905ad0c14fbf1a391b62f10ac602defd1eaf07ab05/py-wifi-helper-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-19 12:01:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "changyy",
    "github_project": "py-wifi-helper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "py-wifi-helper"
}
        
Elapsed time: 0.13386s