Why can't I copy and install the code encrypted with the disk serial number?

Source: Internet
Author: User


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>

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.