Consolidate Evil Twin iface config into interface_primary/interface_secondary#503
Conversation
Agent-Logs-Url: https://github.com/kimocoder/wifite2/sessions/da77cc00-6711-411a-ba41-f2b2cc2ac0fc Co-authored-by: kimocoder <4252297+kimocoder@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b78796263d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.interface_deauth = ( | ||
| interface_deauth | ||
| or Configuration.interface_secondary | ||
| or Configuration.interface |
There was a problem hiding this comment.
Use primary interface for deauth in primary-only mode
When only --interface-primary (or --eviltwin-fakeap-iface) is provided, _get_interface_assignment() explicitly falls back to single-interface mode, but __init__ still sets self.interface_deauth from Configuration.interface instead of the chosen primary. In that scenario deauth packets go out on the scan interface, not the user-selected primary interface, which can break the intended primary-only Evil Twin setup and route deauth traffic to the wrong adapter.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Consolidates Evil Twin interface selection so it uses the generic dual-interface configuration (interface_primary / interface_secondary) and removes the old Evil Twin-specific configuration fields.
Changes:
- Resolve Evil Twin AP/deauth interfaces from constructor args →
Configuration.interface_primary/secondary→Configuration.interface. - Make
--eviltwin-fakeap-iface/--eviltwin-deauth-ifacepopulate the generic primary/secondary interface fields and error on conflicts with--interface-primary/secondary. - Remove
eviltwin_*_ifaceconfiguration fields/defaults and update Evil Twin validation accordingly; delete the patch file from the repo.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| wifite/attack/eviltwin.py | Uses primary/secondary config for interface resolution and updates interface assignment logic. |
| wifite/config/init.py | Removes Evil Twin-specific interface configuration attributes. |
| wifite/config/defaults.py | Removes defaults for the deleted Evil Twin-specific interface fields. |
| wifite/config/parsers/eviltwin.py | Reworks Evil Twin CLI iface flags into aliases of primary/secondary with conflict detection. |
| wifite/config/validators.py | Validates AP capability against interface_primary instead of the removed Evil Twin-specific field. |
| eviltwin-iface-consolidation.patch | Deletes the applied patch file from the repository. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'interface_secondary is set without interface_primary; ' | ||
| 'cannot use dual interface mode for Evil Twin') | ||
| Color.pl('{!} {O}Warning: secondary interface specified without primary; ' | ||
| 'falling back to single interface mode{W}') |
| # Only primary specified → single interface mode using primary as | ||
| # the AP/deauth iface (already resolved in __init__). | ||
| if has_primary and not has_secondary: | ||
| log_info('EvilTwin', | ||
| f'Only primary interface specified ({Configuration.interface_primary}); ' | ||
| 'running single interface mode') |
Applies
eviltwin-iface-consolidation.patchand removes the patch file. The patch eliminates the redundanteviltwin_fakeap_iface/eviltwin_deauth_ifaceconfig fields in favour of the genericinterface_primary/interface_secondaryfields already used elsewhere.Changes
wifite/attack/eviltwin.py__init__: resolvesinterface_ap/interface_deauthwith precedence: constructor arg →interface_primary/interface_secondary→interface_get_interface_assignment: adds partial-spec handling — warns + falls back to single-interface mode when onlyinterface_secondaryis set; logs info when onlyinterface_primaryis setwifite/config/__init__.py/defaults.py: removeseviltwin_deauth_ifaceandeviltwin_fakeap_ifaceclass attributes and their default initialisationswifite/config/parsers/eviltwin.py:--eviltwin-fakeap-ifaceand--eviltwin-deauth-ifacebecome aliases that write intointerface_primary/interface_secondaryand setdual_interface_enabled = True; raisesValueErroron conflicting values with the canonical flagswifite/config/validators.py:validate_eviltwin_configchecksinterface_primaryinstead of the removedeviltwin_fakeap_ifaceOriginal prompt
This pull request was created from Copilot chat.