Init Command (execute the command after login)

pull/393/head
crazypeace 2024-09-21 15:49:46 +08:00
parent 7105543a95
commit 84a95d0ed3
2 changed files with 6 additions and 1 deletions

View File

@ -52,8 +52,11 @@ function updateSSHlink() {
var passwdstr = document.getElementById("password").value;
var passwdstrAfterBase64 = window.btoa(passwdstr);
var initcmdstr = document.getElementById("initcmd").value;
var initcmdstrAfterURI = encodeURIComponent(initcmdstr);
var sshlinkstr;
sshlinkstr = thisPageProtocol+"//"+thisPageUrl+"/?hostname="+hostnamestr+"&port="+portstr+"&username="+usrnamestr+"&password="+passwdstrAfterBase64;
sshlinkstr = thisPageProtocol+"//"+thisPageUrl+"/?hostname="+hostnamestr+"&port="+portstr+"&username="+usrnamestr+"&password="+passwdstrAfterBase64+"&command="+initcmdstrAfterURI;
document.getElementById("sshlink").innerHTML = sshlinkstr;
}

View File

@ -77,6 +77,8 @@
<input class="form-control" type="password" id="totp" name="totp" value="">
</div>
<div class="col">
<label for="InitCmd">Init Command (execute the command after login)</label>
<input class="form-control" type="text" id="initcmd" name="initcmd" value="">
</div>
</div>
<input type="hidden" id="term" name="term" value="xterm-256color">