Fix compatibility with Python 3.13 (crypt module removal & deprecated import logic) #296
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.
This PR fixes
pwncat
compatibility with Python 3.13 by addressing five key issues:Fixes included
Module replacement
crypt
module (dropped in Python 3.13)passlib.hash.sha512_crypt
for hashing/etc/passwd
entries→ Updated in:
modules/linux/enumerate/escalate/append_passwd.py
modules/linux/implant/passwd.py
Import system cleanup
pwncat/commands/__init__.py
pwncat/manager.py
CVE-2019-14287 detection fix
try/except
withpackaging.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
passlib
topyproject.toml
to 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: