Conversation
…ite/config/parsers Co-authored-by: kimocoder <4252297+kimocoder@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix setup.py to include wifite/config package
fix: use find_packages() in setup.py to include wifite/config sub-packages
Mar 19, 2026
There was a problem hiding this comment.
Pull request overview
Updates legacy setup.py packaging so installs done via python setup.py install / non-PEP517 flows correctly include the refactored wifite/config package introduced in PR #469.
Changes:
- Import
find_packagesfromsetuptools. - Replace the manual
packages=[...]list withfind_packages(exclude=['tests', 'tests.*'])to auto-discoverwifitesubpackages while excluding test packages.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
15
to
+19
| version=Configuration.version, | ||
| author='kimocoder', | ||
| author_email='christian@aircrack-ng.org', | ||
| url='https://github.com/kimocoder/wifite2', | ||
| packages=[ | ||
| 'wifite', | ||
| 'wifite/attack', | ||
| 'wifite/attack/portal', | ||
| 'wifite/model', | ||
| 'wifite/native', | ||
| 'wifite/tools', | ||
| 'wifite/ui', | ||
| 'wifite/util', | ||
| ], | ||
| packages=find_packages(exclude=['tests', 'tests.*']), |
Comment on lines
21
to
22
| '': ['wordlist-probable.txt'] | ||
| }, |
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.
After PR #469 refactored
config.pyinto awifite/config/package,setup.pywas never updated — makingwifite.configandwifite.config.parsersabsent from any non-editable install, causing an immediateImportErroron launch.Changes
setup.py: Replace the hardcodedpackages=[...]list withfind_packages(exclude=['tests', 'tests.*'])to automatically discover all sub-packages.tests/has its own__init__.pyso must be explicitly excluded.Using
find_packages()rather than two manual additions prevents recurrence if further sub-packages are added.Original prompt
Problem
After PR #469 refactored the monolithic
config.pyinto awifite/config/package,setup.pywas never updated to include the new sub-packages. Thepackages=[]list is missing bothwifite/configandwifite/config/parsers.Current
setup.pypackages list (lines 19–28):What
wifite/config/currently contains:wifite/config/__init__.py— the mainConfigurationclass (13,497 bytes)wifite/config/defaults.py(8,382 bytes)wifite/config/validators.py(10,208 bytes)wifite/config/manufacturers.py(900 bytes)wifite/config/parsers/— sub-package directoryImpact
Anyone installing via
pip installorpython setup.py installwill immediately get anImportErroron launch because the installed package won't containwifite/config/. Note: development installs (pip install -e .) are unaffected, which is why this has gone undetected.Ironically,
setup.pyitself doesfrom wifite.config import Configurationat the top — so it's importing from the very package it fails to list for distribution.Fix
Update
setup.pyto add the two missing entries:The BlobSha for
setup.pyisb893fc680cdccf79055199d00f9a03342606ae43.Please also consider whether
find_packages()from setuptools would be a more robust long-term solution to prevent this class of omission in the future — if so, replace the manualpackages=[]list withpackages=find_packages()(already imported viafrom setuptools import setup; you'd need to addfind_packagesto the import). However, only do this if it is safe and won't accidentally include test or other unwanted directories.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: Now let me dig deeper into specific code areas — error handling, attack modules, tool detection, and open TODOs.
Assistant: Here's a comprehensive scan and summary of findings for kimocoder/wifite2:
🔍 Project Scan — Findings Summary
📊 Repository Overview
🐛 Open Issues (2)
--simd=neonCPU instruction set on Raspberry Pi 5, causing ~13x slower cracking (210 k/s vs 2800 k/s)Suggestion: Issue #363 is high-impact —
aircrack.py'scrack_handshake()invokesaircrack-ngwithout passing--simddetection, so it may not auto-select NEON on ARM64. Worth probingaircrack-ng --simd-listat startup and passing the best available SIMD flag.⚙️ Code-Level Findings
1. 🔴 Missing SIMD Auto-Detection in
aircrack.pyIn
wifite/tools/aircrack.py,crack_handshake()builds theaircrack-ngcommand with no--simdflag. On platforms like the Raspberry Pi 5 (ARM64), aircrack-ng may default togenericSIMD instead ofneon, causing severe performance degradation.aircrack-ng --simd-list, detect the best available mode, and inject--simd=<best>into crack commands.2. 🟡
setup.pyMissing the Newwifite/config/Sub-packageAfter the recent refactor splitting
config.pyinto aconfig/package (PR #469),setup.pyonly lists:The new
wifite/configandwifite/config/parserssub-packages may not be included inpackages=[], which would break installed packages. Needs verification and update.3. 🟡
wifite.pyis Very Large (1,392 lines)The main
wifite/wifite.pyis a monolithic ~1400-line file. Further modularization (e.g., separating scanning logic, attack orchestration) would improve maintainability.4. 🟡 No
--simdSupport, WPS Detection Inconsistency Betweenreaver&bullyPer
docs/TODO.md, the Pixie-Dust status output and argument handling differs significantly betweenreaverandbully. This means users ...This pull request was created from Copilot chat.
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.