🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

wifi-wrapper

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wifi-wrapper

A python wrapper over nmcli tool for linux devices.

0.1.1
Maintainers
1

wifi_wrapper

A python wrapper over nmcli tool for linux devices.

Install

pip install wifi_wrapper

Quick Usage

from wifi_wrapper import WiFi
from pprint import pprint


wifi = WiFi()

enabled = wifi.wifi_enabled()

if enabled:
  connections = wifi.scan()
  print("Available wifi nearby :")
  pprint(connections) 
"""
Output ->

Available wifi nearby:
        [
            {
                "IN-USE": "*",
                "BSSID": "8C:A3:99:16:4C:63",
                "SSID": "WillowCove",
                "MODE": "Infra",
                "CHAN": "1",
                "RATE": "130 Mbit/s",
                "SIGNAL": "74",
                "BARS": "▂▄▆_",
                "SECURITY": "WPA2",
                "CLIENT": "yes",    
            },
            { ... },
            { ... },
        ]
"""

Dependency

  • Your system should have nmcli installed and you should have sudo permissions
sudo apt install network-manager
  • After the installation has completed, start the Network Manager.
sudo systemctl start NetworkManager.service
  • Next, we will enable Network Manager to start on system boot.
sudo systemctl enable NetworkManager.service
  • Disable hostapd and dnsmasq
sudo systemctl disable dnsmasq.service
sudo systemctl disable hostapd.service
  • Make sure your /etc/NetworkManager/NetworkManager.conf file looks exactly like this
[main]
plugins=ifupdown,keyfile
dhcp=internal

[ifupdown]
managed=false

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts