Guest User

Untitled

a guest
Jul 15th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta content="text/html; charset=ISO-8859-1"
  5. http-equiv="content-type">
  6. <title>Admin Login</title>
  7. </head>
  8. <body>
  9. <big><big>Login
  10. Here<br>
  11. <br>
  12. </big></big>
  13. <form action="/var/www/cgi-bin/Login.py" name="LoginForm"><big>Administration
  14. Login<br>
  15. User Name<br>
  16. <input name="UserName"><br>
  17. <br>
  18. <br>
  19. Password<br>
  20. <input name="PassWord"><br>
  21. </big><br>
  22. <br>
  23. <br>
  24. <input type="submit">
  25. <br>
  26. </form>
  27. &nbsp;__&nbsp;<br>
  28. </body>
  29. </html>
  30.  
  31. #!/usr/bin/python
  32. import cgi
  33. import cgitb; cgitb.enable()
  34. # get the info from the html form
  35. form = cgi.FieldStorage()
  36. #set up the html stuff
  37. reshtml = """Content-Type: text/htmln
  38. <html>
  39. <head><title>Security Precaution</title></head>
  40. <body>
  41. """
  42.  
  43. print reshtml
  44.  
  45. User = form['UserName'].value
  46. Pass = form['PassWord'].value
  47.  
  48. if User == 'Nagaraj' and Pass == 'Tantri':
  49. print '<big><big>Welcome'
  50. print 'Hello</big></big><br>'
  51. print '<br>'
  52. else:
  53. print 'Sorry, incorrect user name or password'
  54.  
  55. print '</body>'
  56. print '</html>'
  57.  
  58. <form action="/var/www/cgi-bin/Login.py" name="LoginForm">
  59.  
  60. <form action="/cgi-bin/Login.py" name="LoginForm">
Add Comment
Please, Sign In to add comment