Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix for python >= 3.12#288

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

Open
SafaSafari wants to merge1 commit intocalebstewart:master
base:master
Choose a base branch
Loading
fromSafaSafari:master
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ and simply didn't have the time to go back and retroactively create one.

## [Unreleased]
### Fixed
- Fixed running on python >= 12
- Fixed `shlex.join` use with non-str type objects (e.g. `RemotePath`)
- Fixed `set` command use with incorrect keys (e.g. `set invalid value`)

Expand Down
7 changes: 4 additions & 3 deletionspwncat/commands/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -433,8 +433,8 @@ def __init__(self, manager: "pwncat.manager.Manager"):
if module_name == "base":
continue
self.commands.append(
loader.find_module(module_name)
.load_module(module_name)
loader.find_spec(module_name)
.loader.load_module(module_name)
.Command(manager)
)

Expand DownExpand Up@@ -788,7 +788,8 @@ def restore_term(self, new_line=True):

class CommandLexer(RegexLexer):
"""Implements a Regular Expression based pygments lexer for dynamically highlighting
the pwncat prompt during typing. The tokens are generated from command definitions."""
the pwncat prompt during typing. The tokens are generated from command definitions.
"""

tokens = {}

Expand Down
5 changes: 3 additions & 2 deletionspwncat/manager.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -388,7 +388,8 @@ def _open_socket(self) -> socket.socket:

def _ssl_wrap(self, server: socket.socket) -> ssl.SSLSocket:
"""Wrap the given server socket in an SSL context and return the new socket.
If the ``ssl`` option is not set, this method simply returns the original socket."""
If the ``ssl`` option is not set, this method simply returns the original socket.
"""

if not self.ssl:
return server
Expand DownExpand Up@@ -934,7 +935,7 @@ def load_modules(self, *paths):

# Why is this check *not* part of pkgutil??????? D:<
if module_name not in sys.modules:
module = loader.find_module(module_name).load_module(module_name)
module = loader.find_spec(module_name).loader.load_module(module_name)
else:
module = sys.modules[module_name]

Expand Down
2 changes: 1 addition & 1 deletionpwncat/platform/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -520,7 +520,7 @@ class RemotePath(base_path, Path):
_stat = None

def __init__(self, *args):
base_path.__init__(*args)
super().__init__(*args)

self.Path = RemotePath
""" A concrete Path object for this platform conforming to pathlib.Path """
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp