Hello again,
You guys might remember me from the "Apache problems" thread. And because this forum is the only one that actually helped me out after months of problems I was hoping you could help me with something related.
Now if you remember the final code that we made for creating an account on a SQUID proxy server that is what we will be dealing with. If not then here it is:
#!/usr/bin/python
print "Content-type: text/html\n\n"
import os
def main():
# username = "working123"
# password = "working"
os.system("htpasswd -b /etc/squid/passwd '%s' '%s'" % (username.replace("'", ""), password.replace("'", "")))
return 0
if __name__ == '__main__': main()
Now the code works fine, the only problem is that it wors fine with stub values. I need user input, so that a user can input a desired username and a desired password and then those strings would be passed to the python script which would then fill in the data. Now I looked around on google and a few friends and we tried this script:
<html>
<form action="http://192.168.1.4:8000/cgi-bin/test.py" method="POST">
Name: <input type="text" name="username"><br>
pass: <input type="text" name="password"><br>
<input type="submit">
</form>
</html>
Now it did not work. I found it quite difficult to find info on this agian. Lets see if you guys can go 2 for 2
-Carter