WiWi is a Python command-line tool for managing and configuring wireless network interfaces on a Linux system. It provides a convenient way to change the operating mode of your wireless interface and restart the NetworkManager service.
-
Restart NetworkManager Service: Quickly restart the NetworkManager service to resolve network connectivity issues.
-
Interface Selection: View a list of available wireless interfaces and select the one you want to configure.
-
Wireless Mode Configuration: Configure the selected wireless interface with different modes:
- IBSS (Ad-hoc): Create a peer-to-peer wireless network.
- Managed: Connect to an existing wireless network.
- AP (Access Point): Turn your device into a wireless access point.
- Monitor: Enable monitoring mode for wireless packet capture and analysis.
-
Interface Information: Get detailed information about the current state and driver of the selected wireless interface.
- Sudo: Sudo access is required for changing interface modes and restarting the NetworkManager service.
- Operating System: Designed for Linux-based systems.
- Python 3.x: WiWi is built using Python 3.x, so make sure you have Python 3.x installed on your system.
- Installed Dependencies: WiWi requires the following dependencies to be installed on your system:
ethtool
network-manager
Before using WiWi, make sure you have the following dependencies installed on your Linux system. Here is an example for Debian/Ubuntu:
sudo apt install && sudo apt upgrade -y
sudo apt install ethtool network-manager
Now you're ready to install and use WiWi:
-
Clone the repository to your local machine:
git clone https://github.com/Superjulien/Wiwi.git cd Wiwi
-
Make the script executable:
chmod +x wiwi.py
Run the script with root privileges to enter interactive mode:
sudo python3 wiwi.py
Follow the on-screen prompts to select a wireless interface and configure its mode.
You can also use command-line arguments to perform specific actions:
Usage: wiwi.py [-h] [-wt interface mode] [-r] [-rq]
WiWi
Optional arguments:
-h, --help Show this help message and exit.
-wt interface mode Choose wireless interface and mode (e.g., wlan0 monitor).
-r Restart NetworkManager service.
-rq Restart NetworkManager service and exit.
-
To restart the NetworkManager service:
sudo python3 wiwi.py -r
-
To restart the service and exit:
sudo python3 wiwi.py -rq
-
To configure a specific wireless interface in monitor mode (replace
wlan0
andmonitor
with your desired interface and mode):sudo python3 wiwi.py -wt wlan0 monitor
WiWi is a Python script that leverages several Linux command-line tools and system utilities to manage wireless network interfaces. Here's a step-by-step breakdown of how WiWi works:
-
Initialization:
- When you run WiWi, it performs initial checks to ensure that it is running on a Linux system and with superuser (root) privileges. If not, it exits with an appropriate error message.
-
User Interface:
- Upon startup, WiWi displays an ASCII art logo to provide a visually appealing introduction.
-
Command-Line Arguments:
- WiWi checks the command-line arguments provided by the user using the
argparse
library. - If the user specifies the
-r
or-rq
flag, WiWi restarts the NetworkManager service accordingly. - If the user specifies the
-wt
flag followed by an interface name and mode, WiWi configures the wireless interface as instructed. - If no arguments are provided, WiWi enters interactive mode to guide the user through the process of selecting an interface and mode.
- WiWi checks the command-line arguments provided by the user using the
-
NetworkManager Restart:
- When the user requests a NetworkManager restart using the
-r
or-rq
flag, WiWi runs theservice NetworkManager restart
command usingsubprocess
. If successful, it displays a success message; otherwise, it shows an error message.
- When the user requests a NetworkManager restart using the
-
Listing and Selecting Interfaces:
- In interactive mode, WiWi lists available wireless interfaces using the
iw dev
command. It parses the output to extract interface names and presents them to the user for selection. - The user selects an interface by entering a corresponding number.
- In interactive mode, WiWi lists available wireless interfaces using the
-
Selecting Wireless Mode:
- After selecting an interface, the user is prompted to choose a wireless mode from the following options: IBSS, Managed, AP, Monitor, or Quit.
- WiWi uses the user's choice to configure the wireless interface accordingly.
-
Wireless Interface Configuration:
- WiWi uses the
ip
andiw
commands through thesubprocess
module to configure the selected wireless interface. - It sets the interface down, changes its mode using the
iw dev
command, and brings it back up. - If any step in the configuration process fails, WiWi displays an error message.
- WiWi uses the
-
Interface Information:
- WiWi provides additional information about the selected wireless interface, such as its current mode and, if available, the driver in use.
-
Completion and Exit:
- After completing the requested action (e.g., restarting NetworkManager or configuring a wireless interface), WiWi either exits or continues to interact with the user in interactive mode.
WiWi simplifies the management of wireless network interfaces by providing a user-friendly and script-driven interface to essential Linux networking commands. Whether you need to troubleshoot network issues, set up an access point, or analyze wireless traffic, WiWi is a versatile tool for Linux users.
This software is provided to you free of charge, with the hope that if you find it valuable, you'll consider making a donation to a charitable organization of your choice :
-
SPA (Society for the Protection of Animals): The SPA is one of the oldest and most recognized organizations in France for the protection of domestic animals. It provides shelters, veterinary care, and works towards responsible adoption.
-
French Popular Aid: This organization aims to fight against poverty and exclusion by providing food aid, clothing, and organizing recreational activities for disadvantaged individuals.
-
Doctors Without Borders (MSF): MSF provides emergency medical assistance to populations in danger around the world, particularly in conflict zones and humanitarian crises.
-
Restaurants of the Heart : Restaurants of the Heart provides meals, emergency accommodation, and social services to the underprivileged.
-
French Red Cross: The Red Cross offers humanitarian aid, emergency relief, first aid training, as well as social and medical activities for vulnerable individuals.
Every small gesture matters and contributes to making a real difference.
For support email :