I have a task assigned to me to create a python script which when called as a cgi should execute the command on the user machine.
Is it possible that I can execute a shell command passed to the python cgi from a html form?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>xyz</title>
</head>
<body>
<big><big>Login
Here<br>
<br>
</big></big>
<form action="/var/www/cgi-bin/xyz.py" name="xyzform"><big>xyz
<br>
enter your value<br>
<input name="text"><br>
<br>
<br>
<input type="submit">
<br>
</form>
__ <br>
</body>
</html>
When the user submits this form the text should be matched in python cgi and then execute the command to access a file in nfs on the user calling machine.
Is it possible by using the cgi or cgitb modules? If not, then how can I achieve this?