Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Monitor Mode Detection for Various Network Adapters #58

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

krnxmid
Copy link

@krnxmid krnxmid commented Feb 15, 2025

Description

This update resolves an issue where the script was not compatible with many popular network adapters, such as the TP-Link WN722N. These adapters retain the same interface name in both managed and monitor modes, meaning they do not append "mon" at the end (e.g., wlan0 remains wlan0 in monitor mode, instead of wlan0mon).

Previously, the script assumed that the monitor mode interface would always be named wlanXmon, which caused compatibility issues. This update introduces a feature that automatically finds the correct monitor mode version of the selected interface, making it compatible with adapters using different naming conventions.

Changes

  • Implemented a function to detect the correct monitor mode interface, regardless of naming convention.
  • Supports both single and multiple interfaces.
  • Ensures that interfaces in monitor mode are correctly identified, even if their names remain unchanged.

Demonstration

Example 1: Adapter that appends "mon"

Actual Interface Name: wlan0 (Managed Mode) → wlan0mon (Monitor Mode)
Expected Detection: Monitor mode interface detected: wlan0mon

Example 2: Adapter that keeps the same name

Actual Interface Name: wlan0 (Managed Mode) → wlan0 (Monitor Mode)
Expected Detection: Monitor mode interface detected: wlan0

Example 3: Multiple interfaces

Actual Interface Names:
wlan1 (Managed Mode) → wlan1mon (Monitor Mode)
wlan2 (Managed Mode) → wlan2 (Monitor Mode)
Expected Detection:
Monitor mode interface detected: wlan1mon
Monitor mode interface detected: wlan2

This fix enhances the script's flexibility and compatibility, making it more reliable across different network adapters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant