From 147c2e3b59a6a494b8442259be0d8971e2b1e0c5 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 29 Apr 2022 16:32:43 +0800 Subject: [PATCH] update interactive shell --- config/shell_list.json | 6 +++++- src/QuickShell/QuickShellController.php | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/shell_list.json b/config/shell_list.json index ab0ead0..1fc28c0 100644 --- a/config/shell_list.json +++ b/config/shell_list.json @@ -5,6 +5,10 @@ }, "neofetch": { "description": "在线运行neofetch", - "command": "curl -H 'User-Agent: Chrome' -s https://gitee.com/mirrors/neofetch/raw/master/neofetch | bash" + "command": "bash <(curl -H 'User-Agent: Chrome' -s https://gitee.com/mirrors/neofetch/raw/master/neofetch)" + }, + "ip": { + "description": "查看本机的公网IP", + "command": "curl -s http://ip.zhamao.xin" } } \ No newline at end of file diff --git a/src/QuickShell/QuickShellController.php b/src/QuickShell/QuickShellController.php index bfa2ae0..a2613d0 100644 --- a/src/QuickShell/QuickShellController.php +++ b/src/QuickShell/QuickShellController.php @@ -30,7 +30,8 @@ class QuickShellController public function index() { $response = implode("\n", QuickShellProvider::getInstance()->getShellList()) . PHP_EOL; - $response .= "执行:\tcurl -s http://shell.zhamao.xin/run/{name} | bash" . PHP_EOL; + $response .= "普通执行:\tcurl -s http://shell.zhamao.xin/run/{name} | bash" . PHP_EOL; + $response .= "交互执行:\tbash <(curl -s http://shell.zhamao.xin/run/{name})" . PHP_EOL; return $response; }