Default. asp
<Html>
<Head>
<Title> Galaxy shadow: disk serial number encryption code access management </Title>
</Head>
<% Dim conn, fs, f
Set conn = Server. CreateObject ("ADODB. Connection ")
Conn. open "driver = {Microsoft Access Driver (*. mdb)}; uid =; pwd = 3302; dbq =" & server. mappath ("id. mdb ")
Set fs = server. createObject ("scripting. filesystemobject ")
TestDrive = Server. MapPath ("/DRIVEINFO. ASP ")
'PassMapPathObtain the drive letter of the current disk..
TestDrive = Left (testDrive, 3)
Set f = fs. getdrive (testDrive)
'CallGetDriveMethod to assign a variable to the drive.
Mysql = "select * From driveinfo where id = 1"
Set rsCheck = Server. CreateObject ("ADODB. Recordset ")
RsCheck. open Mysql, conn, 1, 1
FSER = trim (f. serialnumber)
'Obtain the serial number of the current Disk.
StrSerno = trim (rsCheck. fields ("SERNO "))
StrMark = rsCheck. fields ("WRIMARK ")
'WrimarkThe value is0Indicates that the system is not installed by a legal user.,The value is1Indicates that the system has been installed..The value is1When the serial number does not match the current Disk,The user is deemed to have been illegally copied.
If StrSerno<>FSER and StrMark = 0 then
'For the first installation,Set the write disk flag1.
Session ("pass") = true
'Define UserSession,And set it to globalASPDocument identifier variable.
Set rsMain = Server. CreateObject ("ADODB. Recordset ")
Mysql1 = "update driveinfo set serno =" & FSER & ", WRIMARK = 1"
RsMain. open Mysql1, conn, 1, 2
Response. write ("<A href = 'success. asp'> Installation successful!Welcome to dancing with the wind to access the site!</>"=
Set rsMain = nothing
Else
If StrSerno = FSER then
'Valid users can access.
Session ("pass") = true
Response. write ("<A href = 'success. asp'> Welcome again!You have been authorized to dance with the wind,Allow access...</>"=
Else
'Illegal user copying.
Session ("pass") = false
Response. write ("<A hrefw.'fail.htm'>It is illegal to copy the website's asp document. YOU ARE NOT RIGRTUse the program.</>"=
End if
End if
Set f = nothing
Set fs = nothing
%>
</Html>