asp网页文件解密?asp上传程序

本文目录
asp网页文件解密
官方加密程序:从微软免费下载到sce10chs.exe 直接运行即可完成安装过程。安装完毕后,将生成screnc.exe文件,这是一个运行在DOS PROMAPT的命令工具。
单击“开始”/程序/附件/命令提示符,在MS-DOS 命令行中输入以下命令,即可对某个asp文件加密:
SRCENC 《要加密asp文件名》 《加密后的文件名》
其中项目可以选以下5个参数
含义 举例
/s 可选。命令中带了该参数,加密过程中屏幕上就不会有输出。 screnc /s lacl.sct ulacl.sct
对当前目录中的脚本小程序lacl.sct加密,加密过程中屏幕不显示任何信息
/f 可选。指定输出文件是否覆盖同名输入文件。忽略,将不执行覆盖。 screnc /f lacl.asp
对文件 lacl.asp加密,并用编码后的同名文件覆盖原文件
/xl 可选。是否在.asp文件的顶部添加@Language指令。忽略,将添加。
/l defLanguage 可选。指定Script Encoder加密中选择的缺省脚本语言。文件中不包含这种脚本语言特性的脚本将被Script Encoder 忽略。
对于HTML文件,JScript为内置缺省脚本语言;对于ASP文件,VBScript为缺省脚本语言;对于扩展名为.vbs或.js的文件,Script Encoder也有自适应能力。 screnc /l vbscript lacl.htm ulacl.htm
对文件 lacl.htm加密,并生成输出文件 ulacl.htm,确保没有指定语言属性的脚本块使用 VBScript
/e defExtension 可选。指定待加密文件的文件扩展名。缺省状态下,Script Encoder能识别asa,asp,cdx,htm,html,js,sct和vbs文件。 screnc /e asp 11\*.* f:\labxw-jm
对11目录中的所有.ASP 文件进行加密,并把编码后的输出文件放在f:\labxw-jm目录中
asp上传程序
这个程序是没有任何漏洞的,要想使用得更好,在上传时和执行文件都加上权限那就更安全了,不明白留言给我!
本程序分三个页面及一个文件夹(UpLoadFile),具体文件代码如下:
文件一:上传文件页面
《table width="670" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#999999"》
《form action="upload.asp" enctype="multipart/form-data" name="form1" method="post"》
《tr bgcolor="#999999"》
《td width="180"》《font color="#FFFFFF"》项目《/font》《/td》
《td align="center"》《font color="#FFFFFF"》内容《/font》《/td》
《/tr》
《tr bgcolor="#FFFFFF"》
《td width="180"》产品名称《/td》
《td》
《input name="strName" type="text" id="strName"》 《/td》
《/tr》
《tr bgcolor="#FFFFFF"》
《td width="180"》产品图片《/td》
《td》
《input name="strPhoto" type="file" id="strPhoto"》 《/td》
《/tr》
《tr bgcolor="#FFFFFF"》
《td width="180"》图片格式:gif/jpg《br》
图片大小:150K 《br》
产品介绍《/td》
《td》
《input name="strRemark" cols="45" rows="6" id="strRemark"》 《/td》
《/tr》
《tr bgcolor="#FFFFFF"》
《td width="180"》 《/td》
《td》
《input type="submit" name="Submit" value="提 交"》
《input type="reset" name="Submit2" value="重 置"》《/td》
《/tr》
《/form》
《/table》
文件二:上传执行数据页面
《%
OPTION EXPLICIT
Server.ScriptTimeOut=5000
%》
《!--#include FILE="UpLoadClass.asp"--》
《%
dim request2
’建立上传对象
set request2=New UpLoadClass
’以默认设置打开上传对象
’建议直接修改类的63,64,65,66行为自己需要的默认设置
’类的初始默认值分别为
’p_MaxSize = 153600 单文件最大150K
’p_FileType = "jpg/gif" 允许上传jpg/gif格式文件
’p_SavePath = "" 在当前目录保存文件,这里是相对路径,如:“UpLoadFile/”
’p_AutoSave = 0 自动生成无重复文件名保存目标文件
’这样每次就不要设置同样的参数了
request2.open()
%》
《html》
《head》
《title》快速应用——风声无组件上传类《/title》
***隐藏网址***
《link href="basic.css" rel="stylesheet" type="text/css"》
《/head》
《body》
《table width="760" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF" style="border:1px solid #999999"》
《tr》
《td》《blockquote》
《%
’显示类版本
response.Write("《br》"&request2.version&"《br》")
’显示产品名称
response.Write("《br》产品名称:"&request2.Form("strName"))
’显示源文件路径与名称
response.Write("《br》产品图片:"&request2.Form("strPhoto_Path")&request2.Form("strPhoto_Name"))
response.Write("=》")
’显示目标文件路径与名称
response.Write(request2.SavePath&request2.Form("strPhoto"))
’显示产品介绍
response.Write("《br》产品介绍:"&request2.Form("strRemark"))
’-------说明开始------
’可以看出上面的显示是淋漓尽致的
’文件是否需要保存由类自动判断,这已经符合大多数情况下的应用
’如果您需要更灵活的处理,参见
’-------说明结束------
response.write "《br》"
%》
《/blockquote》《/td》
《/tr》
《/table》
《/body》
《/html》
《%
’释放上传对象
set request2=nothing
%》
文件三:上传定义文件
《%
’----------------------------------------------------------
’***************** 风声无组件上传类 2.0 *****************
’作者:风声
***隐藏网址***
’邮件:Rumor@17560.net
’版权:版权全体,源代码公开,各种用途均可免费使用
’**********************************************************
’----------------------------------------------------------
Class UpLoadClass
Private p_MaxSize,p_FileType,p_SavePath,p_AutoSave,p_Error
Private objForm,binForm,binItem,strDate,lngTime
Public FormItem,FileItem
Public Property Get Version
Version="Rumor UpLoadClass Version 2.0"
End Property
Public Property Get Error
Error=p_Error
End Property
Public Property Get MaxSize
MaxSize=p_MaxSize
End Property
Public Property Let MaxSize(lngSize)
if isNumeric(lngSize) then
p_MaxSize=clng(lngSize)
end if
End Property
Public Property Get FileType
FileType=p_FileType
End Property
Public Property Let FileType(strType)
p_FileType=strType
End Property
Public Property Get SavePath
SavePath=p_SavePath
End Property
Public Property Let SavePath(strPath)
p_SavePath=replace(strPath,chr(0),"")
End Property
Public Property Get AutoSave
AutoSave=p_AutoSave
End Property
Public Property Let AutoSave(byVal Flag)
select case Flag
case 0:
case 1:
case 2:
case false:Flag=2
case else:Flag=0
end select
p_AutoSave=Flag
End Property
Private Sub Class_Initialize
p_Error = -1
p_MaxSize = 1536000 ’单个文件大小1.5M
p_FileType = "" ’可上传任意类型文件,jpg/gif/swf
p_SavePath = "UpLoadFile/" ’保存文件路径
p_AutoSave = 1 ’用原名保存图片,0为用时间
strDate = replace(cstr(Date()),"-","")
lngTime = clng(timer()*1000)
Set binForm = Server.CreateObject("ADODB.Stream")
Set binItem = Server.CreateObject("ADODB.Stream")
Set objForm = Server.CreateObject("Scripting.Dictionary")
objForm.CompareMode = 1
End Sub
Private Sub Class_Terminate
objForm.RemoveAll
Set objForm = nothing
Set binItem = nothing
binForm.Close()
Set binForm = nothing
End Sub
Public Sub Open()
if p_Error=-1 then
p_Error=0
else
Exit Sub
end if
Dim lngRequestSize,binRequestData,strFormItem,strFileItem
Const strSplit="’""》"
lngRequestSize=Request.TotalBytes
if lngRequestSize《1 then
p_Error=4
Exit Sub
end if
binRequestData=Request.BinaryRead(lngRequestSize)
binForm.Type = 1
binForm.Open
binForm.Write binRequestData
Dim bCrLf,strSeparator,intSeparator
bCrLf=ChrB(13)&ChrB(10)
intSeparator=InstrB(1,binRequestData,bCrLf)-1
strSeparator=LeftB(binRequestData,intSeparator)
Dim p_start,p_end,strItem,strInam,intTemp,strTemp
Dim strFtyp,strFnam,strFext,lngFsiz
p_start=intSeparator+2
Do
p_end =InStrB(p_start,binRequestData,bCrLf&bCrLf)+3
binItem.Type=1
binItem.Open
binForm.Position=p_start
binForm.CopyTo binItem,p_end-p_start
binItem.Position=0
binItem.Type=2
binItem.Charset="gb2312"
strItem=binItem.ReadText
binItem.Close()
p_start=p_end
p_end =InStrB(p_start,binRequestData,strSeparator)-1
binItem.Type=1
binItem.Open
binForm.Position=p_start
lngFsiz=p_end-p_start-2
binForm.CopyTo binItem,lngFsiz
intTemp=Instr(39,strItem,"""")
strInam=Mid(strItem,39,intTemp-39)
if Instr(intTemp,strItem,"filename=""")《》0 then
if not objForm.Exists(strInam&"_From") then
strFileItem=strFileItem&strSplit&strInam
if binItem.Size《》0 then
intTemp=intTemp+13
strFtyp=Mid(strItem,Instr(intTemp,strItem,"Content-Type: ")+14)
strTemp=Mid(strItem,intTemp,Instr(intTemp,strItem,"""")-intTemp)
intTemp=InstrRev(strTemp,"\")
strFnam=Mid(strTemp,intTemp+1)
objForm.Add strInam&"_Type",strFtyp
objForm.Add strInam&"_Name",strFnam
objForm.Add strInam&"_Path",Left(strTemp,intTemp)
objForm.Add strInam&"_Size",lngFsiz
if Instr(intTemp,strTemp,".")《》0 then
strFext=Mid(strTemp,InstrRev(strTemp,".")+1)
else
strFext=""
end if
if left(strFtyp,6)="image/" then
binItem.Position=0
binItem.Type=1
strTemp=binItem.read(10)
if strcomp(strTemp,chrb(255) & chrb(216) & chrb(255) & chrb(224) & chrb(0) & chrb(16) & chrb(74) & chrb(70) & chrb(73) & chrb(70),0)=0 then
if Lcase(strFext)《》"jpg" then strFext="jpg"
binItem.Position=3
do while not binItem.EOS
do
intTemp = ascb(binItem.Read(1))
loop while intTemp = 255 and not binItem.EOS
if intTemp 《 192 or intTemp 》 195 then
binItem.read(Bin2Val(binItem.Read(2))-2)
else
Exit do
end if
do
intTemp = ascb(binItem.Read(1))
loop while intTemp 《 255 and not binItem.EOS
loop
binItem.Read(3)
objForm.Add strInam&"_Height",Bin2Val(binItem.Read(2))
objForm.Add strInam&"_Width",Bin2Val(binItem.Read(2))
elseif strcomp(leftB(strTemp,8),chrb(137) & chrb(80) & chrb(78) & chrb(71) & chrb(13) & chrb(10) & chrb(26) & chrb(10),0)=0 then
if Lcase(strFext)《》"png" then strFext="png"
binItem.Position=18
objForm.Add strInam&"_Width",Bin2Val(binItem.Read(2))
binItem.Read(2)
objForm.Add strInam&"_Height",Bin2Val(binItem.Read(2))
elseif strcomp(leftB(strTemp,6),chrb(71) & chrb(73) & chrb(70) & chrb(56) & chrb(57) & chrb(97),0)=0 or strcomp(leftB(strTemp,6),chrb(71) & chrb(73) & chrb(70) & chrb(56) & chrb(55) & chrb(97),0)=0 then
if Lcase(strFext)《》"gif" then strFext="gif"
binItem.Position=6
objForm.Add strInam&"_Width",BinVal2(binItem.Read(2))
objForm.Add strInam&"_Height",BinVal2(binItem.Read(2))
elseif strcomp(leftB(strTemp,2),chrb(66) & chrb(77),0)=0 then
if Lcase(strFext)《》"bmp" then strFext="bmp"
binItem.Position=18
objForm.Add strInam&"_Width",BinVal2(binItem.Read(4))
objForm.Add strInam&"_Height",BinVal2(binItem.Read(4))
end if
end if
objForm.Add strInam&"_Ext",strFext
objForm.Add strInam&"_From",p_start
intTemp=GetFerr(lngFsiz,strFext)
if p_AutoSave《》2 then
objForm.Add strInam&"_Err",intTemp
if intTemp=0 then
if p_AutoSave=0 then
strFnam=GetTimeStr()
if strFext《》"" then strFnam=strFnam&"."&strFext
end if
binItem.SaveToFile Server.MapPath(p_SavePath&strFnam),2
objForm.Add strInam,strFnam
end if
end if
else
objForm.Add strInam&"_Err",-1
end if
end if
else
binItem.Position=0
binItem.Type=2
binItem.Charset="gb2312"
strTemp=binItem.ReadText
if objForm.Exists(strInam) then
objForm(strInam) = objForm(strInam)&","&strTemp
else
strFormItem=strFormItem&strSplit&strInam
objForm.Add strInam,strTemp
end if
end if
binItem.Close()
p_start = p_end+intSeparator+2
loop Until p_start+3》lngRequestSize
FormItem=split(strFormItem,strSplit)
FileItem=split(strFileItem,strSplit)
End Sub
Private Function GetTimeStr()
lngTime=lngTime+1
GetTimeStr=strDate&lngTime
End Function
Private Function GetFerr(lngFsiz,strFext)
dim intFerr
intFerr=0
if lngFsiz》p_MaxSize and p_MaxSize》0 then
if p_Error=0 or p_Error=2 then p_Error=p_Error+1
intFerr=intFerr+1
end if
if Instr(1,LCase("/"&p_FileType&"/"),LCase("/"&strFext&"/"))=0 and p_FileType《》"" then
if p_Error《2 then p_Error=p_Error+2
intFerr=intFerr+2
end if
GetFerr=intFerr
End Function
Public Function Save(Item,strFnam)
Save=false
if objForm.Exists(Item&"_From") then
dim intFerr,strFext
strFext=objForm(Item&"_Ext")
intFerr=GetFerr(objForm(Item&"_Size"),strFext)
if objForm.Exists(Item&"_Err") then
if intFerr=0 then
objForm(Item&"_Err")=0
end if
else
objForm.Add Item&"_Err",intFerr
end if
if intFerr《》0 then Exit Function
if VarType(strFnam)=2 then
select case strFnam
case 0:strFnam=GetTimeStr()
if strFext《》"" then strFnam=strFnam&"."&strFext
case 1:strFnam=objForm(Item&"_Name")
end select
end if
binItem.Type = 1
binItem.Open
binForm.Position = objForm(Item&"_From")
binForm.CopyTo binItem,objForm(Item&"_Size")
binItem.SaveToFile Server.MapPath(p_SavePath&strFnam),2
binItem.Close()
if objForm.Exists(Item) then
objForm(Item)=strFnam
else
objForm.Add Item,strFnam
end if
Save=true
end if
End Function
Public Function GetData(Item)
GetData=""
if objForm.Exists(Item&"_From") then
if GetFerr(objForm(Item&"_Size"),objForm(Item&"_Ext"))《》0 then Exit Function
binForm.Position = objForm(Item&"_From")
GetData=binFormStream.Read(objForm(Item&"_Size"))
end if
End Function
Public Function Form(Item)
if objForm.Exists(Item) then
Form=objForm(Item)
else
Form=""
end if
End Function
Private Function BinVal2(bin)
dim lngValue,i
lngValue = 0
for i = lenb(bin) to 1 step -1
lngValue = lngValue *256 + ascb(midb(bin,i,1))
next
BinVal2=lngValue
End Function
Private Function Bin2Val(bin)
dim lngValue,i
lngValue = 0
for i = 1 to lenb(bin)
lngValue = lngValue *256 + ascb(midb(bin,i,1))
next
Bin2Val=lngValue
End Function
End Class
%》

更多文章:
sometime(英语词组 sometimes, some times, sometime和some time的区别)
2026年1月12日 03:00
acquisition词组(雅思词汇应用:达到雅思7分不得不知道的词组!)
2026年1月31日 17:15
finder 翻译(英语翻译 怎么翻译顺口 Be a better deal finder!)
2025年12月29日 04:15
网页视频下载器手机版(iPhone 手机有什么浏览器可以下载网页链接视频)
2025年9月11日 07:15
嵌入式开发板6818属于armv8架构(工业arm板,像三星6818开发板能做吗)
2026年7月4日 15:00
苹果imgplay怎么导入字体(imgplay字体特效怎么加描边)
2025年10月18日 07:15
headfirstjava中文版pdf(有木有关于Java虚拟机的书籍推荐感激不尽)
2025年12月29日 01:45
51单片机接口线怎么连(USB接口怎么接51单片机最小系统的引脚的求大神赐教)
2026年4月22日 12:15
查找替换中的任意数字和任意字符的区别?表示任意 字符 的正则表达式 符号
2026年9月13日 16:30
background image属性(cssbackground-image属性怎么用)
2025年10月6日 02:30
paper软件下载(小红车wallpaper电脑端怎么下载)
2025年12月21日 15:15
accepting of(下面的句子里accepting是什么从句啊)
2025年12月6日 23:45
editorial assignment什么意思啊(Assignment 代表什么意思)
2025年12月11日 14:15








