network-infra-utility 0.8.3 → 1.0.0
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.
- checksums.yaml +4 -4
- data/tool/webssh/README.md +42 -0
- data/tool/webssh/app.py +788 -0
- data/tool/webssh/cli.bat +17 -0
- data/tool/webssh/config.yml.template +84 -0
- data/tool/webssh/extension//350/256/276/345/244/207/350/257/212/346/226/255.md +103 -0
- data/tool/webssh/requirements.txt +7 -0
- data/tool/webssh/ssh_cli.py +449 -0
- data/tool/webssh/ssh_worker.py +782 -0
- data/tool/webssh/static/vendor/xterm-addon-fit.min.js +8 -0
- data/tool/webssh/static/vendor/xterm.css +209 -0
- data/tool/webssh/static/vendor/xterm.min.js +8 -0
- data/tool/webssh/templates/index.html +2674 -0
- data/tool/webssh/web.bat +41 -0
- data/version.rb +1 -1
- metadata +14 -1
data/tool/webssh/web.bat
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
cd /d "%~dp0"
|
|
3
|
+
|
|
4
|
+
REM ---- Check Python ----
|
|
5
|
+
python --version >nul 2>&1
|
|
6
|
+
if errorlevel 1 (
|
|
7
|
+
echo Error: Python not found. Please install Python 3.8+ from https://python.org
|
|
8
|
+
pause
|
|
9
|
+
exit /b 1
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
REM ---- Check & install dependencies ----
|
|
13
|
+
python -c "import flask, flask_sock, paramiko, yaml, psutil" 2>nul
|
|
14
|
+
if errorlevel 1 (
|
|
15
|
+
echo Installing dependencies...
|
|
16
|
+
python -m pip install -r requirements.txt
|
|
17
|
+
if errorlevel 1 (
|
|
18
|
+
echo Error: Failed to install dependencies.
|
|
19
|
+
pause
|
|
20
|
+
exit /b 1
|
|
21
|
+
)
|
|
22
|
+
echo.
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
REM ---- Read port from config.yml ----
|
|
26
|
+
for /f "tokens=2 delims=: " %%p in ('python -c "import yaml; c=yaml.safe_load(open('config.yml','r',encoding='utf-8')); print(c.get('web',{}).get('port',9999))" 2^>nul') do set WEBPORT=%%p
|
|
27
|
+
if not defined WEBPORT set WEBPORT=9999
|
|
28
|
+
|
|
29
|
+
echo ============================================
|
|
30
|
+
echo WebSSH - Port Auto-Detect Web Terminal
|
|
31
|
+
echo Starting at http://127.0.0.1:%WEBPORT%
|
|
32
|
+
echo Press Ctrl+C to stop
|
|
33
|
+
echo ============================================
|
|
34
|
+
echo.
|
|
35
|
+
|
|
36
|
+
REM ---- Open browser after 2 seconds ----
|
|
37
|
+
start "" cmd /c "timeout /t 2 >nul & start http://127.0.0.1:%WEBPORT%"
|
|
38
|
+
|
|
39
|
+
REM ---- Start server ----
|
|
40
|
+
python app.py
|
|
41
|
+
pause
|
data/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: network-infra-utility
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt
|
|
@@ -296,6 +296,19 @@ files:
|
|
|
296
296
|
- tool/probe/lib/probe_snmp.rb
|
|
297
297
|
- tool/probe/lib/probe_tcp.rb
|
|
298
298
|
- tool/probe/lib/probe_version.rb
|
|
299
|
+
- tool/webssh/README.md
|
|
300
|
+
- tool/webssh/app.py
|
|
301
|
+
- tool/webssh/cli.bat
|
|
302
|
+
- tool/webssh/config.yml.template
|
|
303
|
+
- tool/webssh/extension/设备诊断.md
|
|
304
|
+
- tool/webssh/requirements.txt
|
|
305
|
+
- tool/webssh/ssh_cli.py
|
|
306
|
+
- tool/webssh/ssh_worker.py
|
|
307
|
+
- tool/webssh/static/vendor/xterm-addon-fit.min.js
|
|
308
|
+
- tool/webssh/static/vendor/xterm.css
|
|
309
|
+
- tool/webssh/static/vendor/xterm.min.js
|
|
310
|
+
- tool/webssh/templates/index.html
|
|
311
|
+
- tool/webssh/web.bat
|
|
299
312
|
- version.rb
|
|
300
313
|
homepage: https://github.com/ChenMeng1365/network-infra-utility
|
|
301
314
|
licenses:
|