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 cloud 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 ")
'Use MapPath to obtain the current disk drive letter.
TestDrive = Left (testDrive, 3)
Set f = fs. getdrive (testDrive)
'Call the GetDrive method 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 ")

'Wrimark 0 indicates that the system has not been installed by a legal user. If the value is 1, it indicates that the system has been installed. If the value is 1 and the serial number does not match the current disk, it is determined that the user has been copied illegally.
If StrSerno <> FSER and StrMark = 0 then
'If this is the first installation, set the write disk flag to 1.
Session ("pass") = true
'Define the user Session and set it to the global ASP Document 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! </A> "=
Set rsMain = nothing
Else
If StrSerno = FSER then
'Valid users can enter again.
Session ("pass") = true
Response. write ("<a href = 'success. asp '> welcome again! You have been authorized by dancing with the wind to allow access... </a> "=
Else
'Invalid user copy.
Session ("pass") = false
Response. write ("<a href0000'fail.htm '> it is illegal to copy the website's asp document. you are not rigrt to use the program. </a>" =
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.