From ac97b8f7eca287ee6a81b1dfd3fed6a9115aa3b2 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 19 Mar 2024 23:21:19 +0800 Subject: [PATCH] Update tools.py --- tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools.py b/tools.py index f62892602..7e52be73a 100755 --- a/tools.py +++ b/tools.py @@ -177,7 +177,7 @@ def mwcli(mw_input=0): def open_ssh_port(): import firewall_api - find_ssh_port_cmd = "cat /etc/ssh/sshd_config | grep '^Port \d*' | tail -1" + find_ssh_port_cmd = "cat /etc/ssh/sshd_config | grep '^Port \\d*' | tail -1" cmd_data = mw.execShell(find_ssh_port_cmd) ssh_port = cmd_data[0].replace("Port ", '').strip() if ssh_port == '':