netmode
is a simple Bash script that allows you to switch your network interface between different modes such as managed, monitor, IBSS, mesh, and WDS. It automates enabling/disabling monitor mode and other network modes for quick network configuration.
This script uses the power of iw
as one of its backend commands to manage wireless interfaces efficiently.
- Switch between multiple modes:
- Managed
- Monitor
- IBSS (Ad-Hoc)
- Mesh
- WDS (Wireless Distribution System)
- Auto detect wireless network interface: The script automatically detects the available wireless interface on your system.
- Simple command: One-liner to change the mode of your network interface.
The netmode
script is particularly useful for:
-
Network Administrators: Quickly switch between different network interface modes to troubleshoot connectivity issues or optimize wireless performance without needing to remember complex commands.
-
Penetration Testers: Customize your machine to effortlessly change your wireless interface mode during assessments, enabling you to quickly switch to monitor mode for capturing packets or to managed mode for normal operation, all in one streamlined command.
-
Network Engineers: Simplify the process of configuring network interfaces for various setups, whether it’s for deploying ad-hoc networks, mesh networking, or maintaining WDS connections.
Before using the script, ensure you have the following tools and packages installed:
iw
: A command-line tool for managing wireless devices.gawk
: A programming language used for pattern scanning and processing.iproute2
: A collection of utilities for controlling networking in Linux.
You can install these tools using your system package manager.
-
Clone the repository:
git clone https://github.com/imortio/netmode.git
-
Move the script to
/usr/local/bin/
and make executable to ensure it available system-wide:sudo mv netmode /usr/local/bin/ sudo chmod +x /usr/local/bin/netmode
To switch your network interface mode, use the following syntax:
sudo netmode <mode>
Enable monitor mode on wlan0
:
sudo netmode mon
Switch back to managed/normal mode:
sudo netmode man
For help or usage information:
netmode -h
The script includes basic error handling to ensure:
- You are using a valid network interface.
- The selected mode is supported.
Since this script is purposed to help on a simple task which may be oftenly performed by someone who specifically deals with networks, so contributions are welcome! Here’s how you can help:
-
Fork the Repository: Click on the "Fork" button at the top right corner of the page to create your own copy of the repository.
-
Make Changes: Clone your forked repository to your local machine and make your changes:
git clone https://github.com/imortio/netmode.git cd netmode
-
Create a Pull Request: Once you’ve made your changes, push them to your forked repository and create a pull request:
- Go to the "Pull Requests" tab in the original repository.
- Click on "New Pull Request".
- Choose your branch and submit the pull request.
- Report Issues: If you find any bugs or have feature requests, feel free to open an issue in the issue tracker.
This project is licensed under the Unlicense. See the LICENSE file for more details.