- Notifications
You must be signed in to change notification settings - Fork283
Fix compatibility with Python 3.13 (crypt module removal & deprecated import logic)#296
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…crypt)- Replaced deprecated `find_module` usage in `CommandParser` and `Manager` by `importlib.util.module_from_spec` and `exec_module` (fixes AttributeError: 'FileFinder' object has no attribute 'find_module')- Replaced `crypt.crypt(...)` with `passlib.hash.sha512_crypt` for password hashing (fixes ModuleNotFoundError: No module named 'crypt')- Added `passlib` as a dependency in `pyproject.toml` under [tool.poetry.dependencies] (fixes ModuleNotFoundError: No module named 'passlib')
63b2df4 to9f81b10Compare…tibilityFixedCVE-2019-14287 detection logic.Also reverted a previous accidental change that broke pickle serialization, preventing persistent storage from working properly.
Yakui420 commentedMay 25, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Are you also getting an error when trying to get a shell from a windows target? I get this: |
Chocapikk commentedMay 25, 2025
Hey@Yakui420 , I haven't looked or tested it on Windows environments. But I just think that this payload is not compatible with the env. It says that a command cannot be found, I think it's "stty" here, you will have to add an alternative payload for the interactive shell. |
Uh oh!
There was an error while loading.Please reload this page.
This PR fixes
pwncatcompatibility withPython 3.13 by addressing five key issues:Fixes included
Module replacement
cryptmodule (dropped in Python 3.13)passlib.hash.sha512_cryptfor hashing/etc/passwdentries→ Updated in:
modules/linux/enumerate/escalate/append_passwd.pymodules/linux/implant/passwd.pyImport system cleanup
pwncat/commands/__init__.pypwncat/manager.pyCVE-2019-14287 detection fix
try/exceptwithpackaging.version.parse()→ Prevents crashes on systems with distro-specific or malformed sudo versions.
Pickle serialization fix
→ Restores proper enumeration, persistence, and database commits.
Dependency update
passlibtopyproject.tomlto support the new password hashing backend.Errors resolved
ModuleNotFoundError: No module named 'crypt'AttributeError: 'FileFinder' object has no attribute 'find_module'PicklingError: Can't pickle <class ...>How to install this fix immediately
If this PR is not yet merged, you can install the fixed version directly from my fork: