Fix stale TODO comment around hidden WPA handshake --strip flag#470
Merged
Fix stale TODO comment around hidden WPA handshake --strip flag#470
Conversation
Co-authored-by: kimocoder <4252297+kimocoder@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix stale TODO comment for WPA handshake stripping flag
Fix stale TODO comment around hidden WPA handshake --strip flag
Mar 19, 2026
There was a problem hiding this comment.
Pull request overview
Updates a stale/misleading TODO in the WPA CLI argument definitions to accurately document why the handshake “strip” functionality is kept non-public, aligning the CLI help/comments with the already-implemented internal behavior.
Changes:
- Replace the outdated “uncomment once it works” TODO with an explanation that stripping is implemented but not publicly exposed due to downstream tool compatibility risk.
- Clarify that the hidden
-stripalias is intentionally retained pending broader validation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+814
to
+818
| # Handshake stripping is implemented (see Handshake.strip()), but the public | ||
| # --strip flag remains hidden because stripped captures may break compatibility | ||
| # with aircrack-ng and other downstream tools (Handshake.strip() warns of this). | ||
| # Keep only the hidden compatibility alias (-strip) until the behavior is | ||
| # validated across all supported cracking tools. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
# TODO: Uncomment the --strip option once it workscomment inwifite/args.pywas misleading — the feature is fully implemented (Handshake.strip()exists,config.pyparseswpa_strip_handshake, andattack/wpa.pycalls it), but the public--stripflag is deliberately hidden due to a known aircrack-ng compatibility risk documented inHandshake.strip()itself.Changes
wifite/args.py: Replace the stale TODO with an accurate comment explaining why the public--stripflag stays hidden — stripped captures may break aircrack-ng and other downstream tools — and that the hidden-stripalias is retained intentionally pending broader validation.No runtime behavior is changed.
Original prompt
Open a pull request in
kimocoder/wifite2to fix the stale TODO/comment around the WPA handshake stripping CLI flag.Context
In
wifite/args.py, there is a stale comment near the hidden-stripflag:Repo inspection shows the feature is already implemented internally:
wifite/config.pyparsesargs.wpa_strip_handshakewifite/model/handshake.pyimplementsHandshake.strip()wifite/attack/wpa.pyusesConfiguration.wpa_strip_handshakewhen saving handshakesHowever,
Handshake.strip()contains this warning:# XXX: This method might break aircrack-ng, use at own risk.That means the existing TODO is misleading. The likely intent is not “uncomment once it works” but rather “keep hidden until compatibility is validated/documented.”
Requested change
Make the smallest safe change that fixes this stale/misleading comment.
Requirements
wifite/args.pyso it accurately reflects the current state.--stripflag unless you can prove from the code/tests that it is safe and intended.-stripcompatibility alias as-is unless there is a very strong reason to change it.Handshake.strip()may affect downstream tool compatibility.Preferred outcome
A minimal PR that replaces the stale TODO with an accurate explanatory comment, without changing functionality.
Validation
Deliverable
Open a PR with the stale TODO/comment corrected.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Scan the project for issues, problems or improvements to add. Summary me the findings
Assistant:
I'll scan the repository to understand its structure, current issues, and code quality. Let me gather information from multiple angles.
Assistant: Now let me scan the codebase for potential issues, code quality problems, and improvement opportunities.
Assistant: Now let me also look at the existing TODO items and check for test coverage:
Assistant: Here's a comprehensive summary of my findings after scanning the kimocoder/wifite2 project:
📋 Project Scan Summary
📊 Overview
🐛 Open Issues
--simd=genericinstead ofneon, resulting in ~13x slower hash rates (210 k/s vs 2800 k/s). Wifite may need to detect SIMD capabilities and pass--simd=neonto aircrack-ng explicitly.🔧 Code-Level Findings
1. Acknowledged TODOs & HACKs in Code 🟡
Multiple
TODO,FIXME,XXX, andHACKmarkers exist throughout the codebase:wifite/model/handshake.py—HACK: Arbitrarily selects the first BSSID/ESSID pair when neither is known; a user selection menu is missing (TODO: Display menu for user to select from list).wifite/model/handshake.py—XXX: Thestrip()method warns it may break aircrack-ng.wifite/util/crack.py—TODO: Bring back the 'print' option, for easy copy/pasting.wifite/config.py—TODO: categorize configuration into separate classes (under config/*.py)— theConfigurationclass is a ~1,440-line monolith holding all settings as class variables.wifite/args.py—TODO: Uncomment the --strip option once it works— feature disabled/commented out.wifite/tools/airmon.py—TODO: add support for other unorthodox init systems.wifite/attack/wpa.py—TODO: Potentially add a fallback or user choice for aircrack-ng for non-SAE.docs/EVILTWIN.md— MultipleTODOs for HTTPS spoofing, password validation, CGI server state management, and Apple/Google captive portal detection.docs/TODO.md...This pull request was created from Copilot chat.
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.