default.asp
<html>
<head>
<title>星河影动之磁盘序列号加密代码存取管理</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")
' 通过MapPath获得当前盘盘符.
testDrive=Left(testDrive,3)
set f=fs.getdrive(testDrive)
' 调用GetDrive方法赋予驱动器一个变量.
Mysql="select * From driveinfo where id=1"
set rsCheck = Server.CreateObject("ADODB.Recordset")
rsCheck.open Mysql,conn,1,1
FSER=trim(f.serialnumber)
' 获得当前盘序列号.
StrSerno=trim(rsCheck.fields("SERNO"))
StrMark=rsCheck.fields("WRIMARK")

' Wrimark值为0表示代表合法用户未安装系统,值为1代表该系统已安装.值为1且序列号与当前盘不符时,则判定为非法复制用户
if StrSerno<>FSER and StrMark=0 then
' 如是第一次安装,则设置写盘标志为1.
session("pass")=true
' 定义用户Session,并设置为全局ASP文档标识变量.
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'>安装成功!欢迎光临随风起舞存取站点!</a>"=
set rsMain=nothing
else
if StrSerno=FSER then
' 合法用户可再次进入.
session("pass")=true
response.write("<a href='success.asp'>再次欢迎!您已被随风起舞授权,允许进行存取...</a>"=
else
' 非法复制用户.
session("pass")=false
response.write("<a href='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>

标签:
|为什|什么|么用|用磁|磁盘|盘序|序列|列号|号加|加密|密过|过的|的代|代码|码不|不能|能被|被复|复制|制安|安装|装?|?|

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com