Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!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>Admin Login</title>
- </head>
- <body>
- <big><big>Login
- Here<br>
- <br>
- </big></big>
- <form action="/var/www/cgi-bin/Login.py" name="LoginForm"><big>Administration
- Login<br>
- User Name<br>
- <input name="UserName"><br>
- <br>
- <br>
- Password<br>
- <input name="PassWord"><br>
- </big><br>
- <br>
- <br>
- <input type="submit">
- <br>
- </form>
- __ <br>
- </body>
- </html>
- #!/usr/bin/python
- import cgi
- import cgitb; cgitb.enable()
- # get the info from the html form
- form = cgi.FieldStorage()
- #set up the html stuff
- reshtml = """Content-Type: text/htmln
- <html>
- <head><title>Security Precaution</title></head>
- <body>
- """
- print reshtml
- User = form['UserName'].value
- Pass = form['PassWord'].value
- if User == 'Nagaraj' and Pass == 'Tantri':
- print '<big><big>Welcome'
- print 'Hello</big></big><br>'
- print '<br>'
- else:
- print 'Sorry, incorrect user name or password'
- print '</body>'
- print '</html>'
- <form action="/var/www/cgi-bin/Login.py" name="LoginForm">
- <form action="/cgi-bin/Login.py" name="LoginForm">
Add Comment
Please, Sign In to add comment