Skip to content
This repository was archived by the owner on Aug 17, 2026. It is now read-only.

Fix Python 3.13 compatibility (crypt removal & deprecated import logic) — now in the actively-maintained pwncat-vl fork - #296

Open
Chocapikk wants to merge 2 commits into
calebstewart:masterfrom
Chocapikk:master
Open

Fix Python 3.13 compatibility (crypt removal & deprecated import logic) — now in the actively-maintained pwncat-vl fork#296
Chocapikk wants to merge 2 commits into
calebstewart:masterfrom
Chocapikk:master

Conversation

@Chocapikk

@Chocapikk Chocapikk commented Apr 5, 2025

Copy link
Copy Markdown

Note

Upstream pwncat is unmaintained, so I maintain an actively-developed fork: pwncat-vl — full Python 3.13 / 3.14 support, plus many more fixes and features.

This PR started as an early Python 3.13 compatibility patch. The implementation has changed substantially since, so the fork is the source of truth, not this diff. Install it directly:

pipx install git+https://github.com/Chocapikk/pwncat-vl

Issues and PRs are welcome on the fork.

…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')
@Chocapikk
Chocapikk force-pushed the master branch 2 times, most recently from 63b2df4 to 9f81b10 Compare April 5, 2025 20:13
…tibility

Fixed CVE-2019-14287 detection logic.

Also reverted a previous accidental change that broke pickle serialization, preventing persistent storage from working properly.
@Yakui420

Yakui420 commented May 25, 2025

Copy link
Copy Markdown

Are you also getting an error when trying to get a shell from a windows target?

I get this:

[12:05:36] received connection from 10.10.100.15:49331         
[12:06:06] connection failed: channel receive timed out: b"Invoke-Expression : The
           term 'stty' is not recognized as the name of a cmdlet, function, script
           file, or operable \r\nprogram. Check the spelling of the name, or if a
           path was included, verify that the path is correct and try again.\r\nAt
           line:1 char:501\r\n+ ... BytesRead - 1);$Output = try {Invoke-Expression
           $Command 2>&1 | Out-S ...\r\n+
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          :
           ObjectNotFound: (stty:String) [Invoke-Expression],
           CommandNotFoundException\r\n    + FullyQualifiedErrorId : CommandNotFoun
           dException,Microsoft.PowerShell.Commands.InvokeExpressionCommand\r\n
           \r\n"
(local) pwncat$

@Chocapikk

Copy link
Copy Markdown
Author

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.

@Chocapikk Chocapikk changed the title Fix compatibility with Python 3.13 (crypt module removal & deprecated import logic) Fix Python 3.13 compatibility (crypt removal & deprecated import logic) — now in the actively-maintained pwncat-vl fork Jun 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants