mirror of https://github.com/huashengdun/webssh
Init Command (execute the command after login)
parent
7105543a95
commit
84a95d0ed3
|
@ -52,8 +52,11 @@ function updateSSHlink() {
|
||||||
var passwdstr = document.getElementById("password").value;
|
var passwdstr = document.getElementById("password").value;
|
||||||
var passwdstrAfterBase64 = window.btoa(passwdstr);
|
var passwdstrAfterBase64 = window.btoa(passwdstr);
|
||||||
|
|
||||||
|
var initcmdstr = document.getElementById("initcmd").value;
|
||||||
|
var initcmdstrAfterURI = encodeURIComponent(initcmdstr);
|
||||||
|
|
||||||
var sshlinkstr;
|
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;
|
document.getElementById("sshlink").innerHTML = sshlinkstr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,8 @@
|
||||||
<input class="form-control" type="password" id="totp" name="totp" value="">
|
<input class="form-control" type="password" id="totp" name="totp" value="">
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="term" name="term" value="xterm-256color">
|
<input type="hidden" id="term" name="term" value="xterm-256color">
|
||||||
|
|
Loading…
Reference in New Issue