diff options
Diffstat (limited to 'client_manager.py')
| -rw-r--r-- | client_manager.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client_manager.py b/client_manager.py index ab29e16..016e76d 100644 --- a/client_manager.py +++ b/client_manager.py @@ -47,6 +47,10 @@ def get_ssh_port(pid): if i in l[1] and "*:" in l[8]: port = l[8][2:] ''' + # using the pid of the ssh connection, get the string of the connection 45.32.108.159:ssh->210.10.76.5:45460 + # then get the other pid with the same string + # then get the other pid + # then get the publicly forwarded port try: lines = subprocess.check_output("lsof -i -n | grep sshd", shell=True, text=True).splitlines() pid = str(pid) |
