How to avoid typing a URL directly in the address bar to bypass the login page error? _ Programming 10000 Q

Source: Internet
Author: User
Tags rtrim

The first option: use two files to solve the problem:userandpwd.asp and secretarticle.asp. The former is only responsible for providing input username and password, the latter to complete the verification work. In this way, even if you know the URL of the asppwdrst.asp , you will never see what content.

Userandpwd.asp

< HTML >

< BODY >

< form Name= "Form1" action=

"Secretarticle.asp" Method_

= "POST" >

< input type= "hidden" name= "Vti-group" value=_ "0" >

< div align= "center" >< Center >< p >

Account < input type= "text"

Name= "T1" size= ">"

Password < input type = "Password" name= "T2" size=_ "> "

< input type= "submit" value= " confirmation " name=_ "B1" >

</P ></center ></div >

</form >

</body >

Secretarticle.asp

' secret information on the page , and is responsible for verifying the account number and password (account : liyanbing, password : 13066093625), after the pass, before you can browse .

< HTML >

<% if RTrim (Request.Form ("T1")) =

"Liyanbing" And_ RTrim (Request.Form ("t2")) =

"13066093625" then% >

< BODY >

< p align= "center" >< Font face= " song body " size= "7" _ Color= "#0000ff" >

Congratulations , login success !

</font ></p >

</body >

<% Else% >

< BODY >

< p align= "center" >< Font face= " song body " size= "7" _ Color= "#0000ff" >

Please enter your username and password !

</font ></p >

</body >

<% End If% >

The second option: simpler, but achieves the same function:

Login.asp

' login page

<%@ language=vbscipt% >

< @Response. buffer=true% >

< HTML >

< head >< title > Shake Snow Spray Cloud Welcome Login </title >

< BODY >

<%

If Request ("username") = "liyanbing" and Request ("password") = "13066093625" Then

Response.Redirect "Chunfeng.asp"

' preset account number : liyanbing; Password : 13066093625; Material page : chunfeng.asp.

End If

% >

< font style= "font-size:12pt" > Please enter your account and password "</font >< br >

< form action= "Login.asp" method= "POST" >

< br > account :< input type=text name= "username" >

< br > password :< input type=password name= "password" >

< br >< input type=submit value= " login " >

</form >

</body >

[1]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.