pywebexec 1.7.15__py3-none-any.whl → 1.7.18__py3-none-any.whl
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.
- pywebexec/__init__.py +0 -1
- pywebexec/pywebexec.py +3 -2
- pywebexec/static/js/script.js +2 -2
- pywebexec/version.py +2 -2
- {pywebexec-1.7.15.dist-info → pywebexec-1.7.18.dist-info}/METADATA +1 -1
- {pywebexec-1.7.15.dist-info → pywebexec-1.7.18.dist-info}/RECORD +10 -10
- {pywebexec-1.7.15.dist-info → pywebexec-1.7.18.dist-info}/LICENSE +0 -0
- {pywebexec-1.7.15.dist-info → pywebexec-1.7.18.dist-info}/WHEEL +0 -0
- {pywebexec-1.7.15.dist-info → pywebexec-1.7.18.dist-info}/entry_points.txt +0 -0
- {pywebexec-1.7.15.dist-info → pywebexec-1.7.18.dist-info}/top_level.txt +0 -0
pywebexec/__init__.py
CHANGED
pywebexec/pywebexec.py
CHANGED
@@ -25,6 +25,7 @@ import termios
|
|
25
25
|
import struct
|
26
26
|
import subprocess
|
27
27
|
import logging
|
28
|
+
from pathlib import Path
|
28
29
|
import pyte
|
29
30
|
from . import host_ip
|
30
31
|
|
@@ -720,6 +721,7 @@ def run_command_endpoint():
|
|
720
721
|
'from': request.remote_addr,
|
721
722
|
})
|
722
723
|
|
724
|
+
Path(get_output_file_path(command_id)).touch()
|
723
725
|
# Run the command in a separate thread
|
724
726
|
thread = threading.Thread(target=run_command, args=(request.remote_addr, user, command_path, params, command_id, rows, cols))
|
725
727
|
thread.start()
|
@@ -848,9 +850,8 @@ def main():
|
|
848
850
|
COMMAND_STATUS_DIR = f"{os.getcwd()}/{COMMAND_STATUS_DIR}"
|
849
851
|
check_processes()
|
850
852
|
sys.argv.remove("shareterm")
|
851
|
-
sys.argv[0] = PYWEBEXEC
|
852
853
|
with open(basef + ".log", "a") as log:
|
853
|
-
pywebexec = subprocess.Popen(
|
854
|
+
pywebexec = subprocess.Popen(sys.argv, stdout=log, stderr=log, bufsize=1)
|
854
855
|
print_urls(term_command_id)
|
855
856
|
res = start_term()
|
856
857
|
print("Stopping server")
|
pywebexec/static/js/script.js
CHANGED
@@ -270,7 +270,7 @@ async function viewOutput(command_id) {
|
|
270
270
|
try {
|
271
271
|
const response = await fetch(`/command_status/${command_id}${urlToken}`);
|
272
272
|
if (!response.ok) {
|
273
|
-
|
273
|
+
outputInterval = setInterval(() => fetchOutput(nextOutputLink), 500);
|
274
274
|
}
|
275
275
|
const data = await response.json();
|
276
276
|
const commandInfo = document.getElementById('commandInfo');
|
@@ -428,7 +428,7 @@ function sliderUpdateOutput()
|
|
428
428
|
{
|
429
429
|
const percentage = slider.value/10;
|
430
430
|
outputLength = Math.floor((fullOutput.length * percentage) / 100);
|
431
|
-
|
431
|
+
limitedOutput = fullOutput.slice(0, outputLength);
|
432
432
|
terminal.clear();
|
433
433
|
terminal.reset();
|
434
434
|
terminal.write(limitedOutput);
|
pywebexec/version.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
pywebexec/__init__.py,sha256=
|
1
|
+
pywebexec/__init__.py,sha256=197fHJy0UDBwTTpGCGortZRr-w2kTaD7MxqdbVmTEi0,61
|
2
2
|
pywebexec/host_ip.py,sha256=Ud_HTflWVQ8789aoQ2RZdT1wGI-ccvrwSWGz_c7T3TI,1241
|
3
|
-
pywebexec/pywebexec.py,sha256=
|
4
|
-
pywebexec/version.py,sha256=
|
3
|
+
pywebexec/pywebexec.py,sha256=j52h1x4VgVLgDZ6hTX-QMt7UbmDtO0MHg2EnLcmvcGQ,32727
|
4
|
+
pywebexec/version.py,sha256=atP_5XTod1UHdqP67s_f64V3lP30xwHn22VXn1ZEIgM,513
|
5
5
|
pywebexec/static/css/Consolas NF.ttf,sha256=DJEOzF0eqZ-kxu3Gs_VE8X0NJqiobBzmxWDGpdgGRxI,1313900
|
6
6
|
pywebexec/static/css/style.css,sha256=fU-_eAk6Xy0L_GbH9rJBkeCFe5M2RYQA99cvRZ3pW9w,7934
|
7
7
|
pywebexec/static/css/xterm.css,sha256=uo5phWaUiJgcz0DAzv46uoByLLbJLeetYosL1xf68rY,5559
|
@@ -23,7 +23,7 @@ pywebexec/static/images/running.svg,sha256=fBCYwYb2O9K4N3waC2nURP25NRwZlqR4PbDZy
|
|
23
23
|
pywebexec/static/images/success.svg,sha256=NVwezvVMplt46ElW798vqGfrL21Mw_DWHUp_qiD_FU8,489
|
24
24
|
pywebexec/static/js/commands.js,sha256=TmfcauQlfIeAeC8pwQvKspc4PA_VYLbPTnVCDVBZ87I,8420
|
25
25
|
pywebexec/static/js/popup.js,sha256=_2GzUizJ-sdZFWG7SZwbYJTPbu4EvVq7D5Q_UE8nepA,9452
|
26
|
-
pywebexec/static/js/script.js,sha256=
|
26
|
+
pywebexec/static/js/script.js,sha256=0vyxfgYYPsnnfscn11YcFYDyDYwmIGEVTe0dx0UJIqA,18538
|
27
27
|
pywebexec/static/js/xterm/LICENSE,sha256=EU1P4eXTull-_T9I80VuwnJXubB-zLzUl3xpEYj2T1M,1083
|
28
28
|
pywebexec/static/js/xterm/addon-canvas.js,sha256=ez6QTVvsmLVNJmdJlM-ZQ5bErwlxAQ_9DUmDIptl2TM,94607
|
29
29
|
pywebexec/static/js/xterm/addon-canvas.js.map,sha256=ECBA4B-BqUpdFeRzlsEWLSQnudnhLP-yPQJ8_hKquMo,379537
|
@@ -36,9 +36,9 @@ pywebexec/static/js/xterm/xterm.js.map,sha256=Y7O2Pb-fIS7Z8AC1D5s04_aiW_Jf1f4mCf
|
|
36
36
|
pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
37
|
pywebexec/templates/index.html,sha256=KSdQYBdzWKP6v0ETZsMO_729aosGBAzJxAss8T5jCto,2953
|
38
38
|
pywebexec/templates/popup.html,sha256=f5m4u8WKpkevL2mQamGqo4_y-rSuLOXGuNsezuUbniY,1508
|
39
|
-
pywebexec-1.7.
|
40
|
-
pywebexec-1.7.
|
41
|
-
pywebexec-1.7.
|
42
|
-
pywebexec-1.7.
|
43
|
-
pywebexec-1.7.
|
44
|
-
pywebexec-1.7.
|
39
|
+
pywebexec-1.7.18.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
40
|
+
pywebexec-1.7.18.dist-info/METADATA,sha256=uHZ987HDurDIzK2s6krXQHYXkpqjS91Z_uQiIaovs98,8147
|
41
|
+
pywebexec-1.7.18.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
42
|
+
pywebexec-1.7.18.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
|
43
|
+
pywebexec-1.7.18.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
|
44
|
+
pywebexec-1.7.18.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|