diff options
| -rw-r--r-- | LICENSE | 21 | ||||
| -rw-r--r-- | pkctl.py | 16 | ||||
| -rw-r--r-- | pkd_stub.py | 9 |
3 files changed, 28 insertions, 18 deletions
@@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Carson Fleming + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. @@ -2,17 +2,11 @@ import os, sys, signal, socket, selectors, time, tty # basic config -#SOCKET_FILE = "/run/pk/pk.sock" -#PID_FILE = "/run/pk/pk.pid" -#DAEMON_FILE = "/usr/bin/pkd" -#LOG_FILE = "/var/log/pk.log" -#KEY_FILE = "/etc/pk/server_key.json" - -SOCKET_FILE = "./pk.sock" -PID_FILE = "./pk.pid" -DAEMON_FILE = "python pkd.py" -LOG_FILE = "./pk.log" -KEY_FILE = "./default_key.json" +SOCKET_FILE = "/run/pk/pk.sock" +PID_FILE = "/run/pk/pk.pid" +DAEMON_FILE = "/usr/bin/pkd" +LOG_FILE = "/var/log/pk.log" +KEY_FILE = "/etc/pk/server_key.json" DAEMON_PORT = 2236 DAEMON_BITS = 4096 diff --git a/pkd_stub.py b/pkd_stub.py index c8e2ae4..db378a3 100644 --- a/pkd_stub.py +++ b/pkd_stub.py @@ -422,6 +422,8 @@ def screen_reader(screen): cmdq_lock.release() elif cmd == b'show-serverkey': resp = showcrypto() + elif cmd == b'\xc0\xdeprompt': + pass elif cmd == b'pty': resp = '[pk] Must specify a client to connect to via PTY.' elif cmd[:4] == b'pty ': @@ -444,13 +446,6 @@ def screen_reader(screen): detach_screen(screen) return resp = '[pk] %s' % pty_out - elif cmd == b'\xc0\xdeprompt': - try: - screen.sendall(prompt_str()) - except: - detach_screen(screen) - return - continue elif len(cmd) > 0: shcmd = True targets = [] |
