i have a HTML form which takes any linux command as an input and I want to execute that command on the server and provide output back to the user. My issue is I am not able to pass the command entered in the textbox to Linux using execCode function. Following is my code.
Please advise how can i get this thing working. Thanks.
<form name="runCommand" method="GET">
iDirect Command Name:<br>
<input type="text" name="command" >
<!--input type="text" -->
<br><br>
var = document.getElementById("command").value
<!--input type="submit" value="Run Command" onclick="execCode('echo document.getElementById("command").value');return false"-->
<input type="submit" value="Run Command" onclick="execCode('echo var');return false">
</form>
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire