Background user password and verification code calculation Login

Source: Internet
Author: User

Not to explain, very powerful programmers. If you design the program in this way, it will be much safer.

Hackers cannot log on even if they get the correct password. Because he does not know the calculation method. In addition, the Security Password parameters can be changed at will in the background.

Website configuration file: Const. asp code:

<%
++ ---------- Configuration information starts ---------- ++
Do not modify this file easily
Single quotes cannot be removed
Do not use the carriage return symbol
If you do not know about global variables, see the program instructions included in the software.

----- The virtual directory of the system, which cannot be followed by/, for example, F4, Test/F4
Const G_VIRTUAL_ROOT_DIR = ""

----- Manage directories, which cannot be followed by/, without virtual directories
Const G_ADMIN_DIR = "Administrators"

----- User directory, which cannot be followed by/, without a virtual directory
Const G_USER_DIR = "WisewayUser"

----- User file directory, which cannot be followed by/, without virtual directories, such as User, Test/User
Const G_USERFILES_DIR = "WisewayUserFiles"

----- Upload the file directory, which cannot be followed by/, without a virtual directory
Const G_UP_FILES_DIR = "Files"

----- Template file directory, which cannot be followed by/, without a virtual directory
Const G_TEMPLETS_DIR = "MoBan"

----- Control load configuration directory name
Const G_DBCONFIGFILE_DIR = "DBConfigFiles"

----- The main system is a SQL database; 1: SQL, 0: ACCESS
Const G_IS_ SQL _DB = "0"

----- Primary database, followed by/, without virtual directories
Const G_DATABASE_CONN_STR = "WiseyData/Wiay. mdb"

----- The membership system is a SQL database; 1: SQL, 0: ACCESS
Const G_IS_ SQL _User_DB = "0"

----- Member database, which cannot be followed by/, without a virtual directory
Const G_User_DATABASE_CONN_STR = "WiseyData/WiseyME. mdb"

----- The collection system is a SQL database; 1: SQL, 0: ACCESS
Const G_IS_ SQL _COLLECT_DB = "0"

----- Collection database, followed by/, without a virtual directory
Const G_COLLECT_DATA_STR = "WisayData/WiseyCollect. mdb"

----- Set the number of news records read at a time. If the collection speed is slow, set it to a smaller value.
Const CollectMaxOfOnePage = "8"

----- Storage location of collected files
Const G_SAVE_FILE_PATH = "File"

----- Maximum number of pages for collecting news lists
Const G_NEWS_LIST_PAGES_NUMBER = "300"

----- Archive database type. 0 indicates the ACCESS database, and 1 indicates the SQL database.
Const G_IS_ SQL _Old_News_DB = "0"

----- Archive database, followed by/or virtual object
Const G_Old_News_DATABASE_CONN_STR = "WisyData/WwayOldNs. mdb"

----- Archive template address. Modify the template. Set the corresponding tag.
Const G_OLD_TEMPLET_PATH = "/MoBan/OldNews/Index.htm"

----- IP address library. Do not add a virtual directory
Const G_IP_DATABASE_CONN_STR = "Wisayata/WisyAessIp. mdb"

----- Logon logs, error logs, and Operation Log Retention days. The default value is 7.
Const G_HOLD_LOG_DAY_NUM = "7"

----- Front-end search mode. The value 0 indicates normal, and the value 1 indicates time-based search.
Const G_SEARCH_TYPE = "1"

----- The number of data records that are published to be stopped for one second. 0 indicates that the data is not stopped.
Const G_REFRESH_NUM_TIME = "0"

----- Number of automatic paging characters in news. If the value is 0, no paging characters are displayed. One Chinese character is counted as two paging characters and does not contain Html tags.
Const G_FS_Page_Txtlength = "0"

----- System Version Information
Const G_COPYRIGHT = "4.0 Sp5"

Set Security Password parameters, ", 0 ";
Purpose: After the Administrator's real password is obtained by downloading the database or SQL injection, the administrator cannot enter the system.
If the 1st-bit security password is enabled for 0, if the security password is not enabled for 1
The first digit in the verification code is used for calculation. The value ranges from 1 to 4.
The first digit in the verification code is used for calculation. The value ranges from 1 to 4.
What is the calculation of the two Verification codes obtained by 4th bits? 1 is an addition operation; 2 is a multiplication operation.
Insert the obtained result to the nth digit of the password in 5th bits.
For example, if the security code parameter is set to, and 5, the security code is enabled. The result of multiplying the first and third digits of the verification code is inserted after the fifth digit of the password.
If the verification code generated when you log on is 3568, the administrator password is TryLogin
The password you should enter is TryLo18gin.
If the verification code contains random letters, do not use this function.
Const G_SAFE_PASS_SET_STR = "1, 1, 3, 2, 1"
Session Timeout. 1 indicates that the Session will never expire, and 0 indicates that the Session will expire in 10 minutes.
Const G_SESSION_TIME_OUT = "1"

Script timeout
Const G_SERVER_SCRIPT_TIME_OUT = "600"

Whether the system login security is verified to the database, 0 is not verified to the database, 1 is verified to the database
Const G_SESSION_GETDATA = "0"

News refresh frequency
The first parameter indicates the number of seconds to refresh, and the second parameter indicates the number of records to be refreshed each time.
Const G_REFRESH_SPEED = "1, 5"

Start of server component variable

Scripting. Dictionary;
Const G_FS_DICT = "Scripting. Dictionary"

Scripting. FileSystemObject;
Const G_FS_FSO = "Scripting. FileSystemObject"

Adodb. Stream;
Const G_FS_STREAM = "Adodb. Stream"

Adodb. RecordSet;
Const G_FS_RS = "Adodb. RecordSet"

Microsoft. XMLHTTP;
Const G_FS_HTTP = "Microsoft. XMLHTTP"

MSXML2.XMLHTTP
Const G_FS_XMLHTTP = "MSXML2.XMLHTTP"

Adodb. Connection;
Const G_FS_CONN = "Adodb. Connection"

Add the image address to the favorites folder. Note that "/" cannot be added in front of the image address "/"
Const AddFavorite = "sys_images/icon_star_2.gif"
Send a friend image address. Note that "/" cannot be added in front of the image address "/"
Const SendFriend = "sys_images/sendmail.gif"


++ ---------- Configuration information END ---------- ++
%>

 

 

Related Article

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.