×

asp解析源码

asp解析源码(有关ASP源代码解密)

admin admin 发表于2022-12-31 23:59:02 浏览50 评论0

抢沙发发表评论

本文目录

有关ASP源代码解密


去下个zwdecode.exe吧,下载地址:

想知道解密的具体原理请参考:http://www.newebug.com/article/asp/2280.shtml
我帮你解了一下,内容是这样的:
《%set rs=co-n.execute(“select * from [copyright]“)%》
《title》《%=rs(“webname“)%》》》欢迎《《%=sessio-(“admin“)%》》进入(《%=homes%》)后台管理中心《/title》

简单ASP 代码 分析


代码断断续续,不全.所以一时无法准确作出解释,但有有几段代码可以解释给你:
《!--#include file=“conn.asp“--》
这段是在当前页面上嵌入另一个名为conn.asp的页,作数据库连接用,连接字符串应该就写在conn.asp中.
《%
set rss=server.createobject(“adodb.recordset“)
sqls=“select * from class order by id asc“
rss.open sqls,conn,1,1
%》
这块的作用是将库中class表的内容根据第二句执行查询后,填入rss。这里的关键在第二句:等号右边部分为SQL语言,改变这部分内容会有不同的结果。
《%do until rss.eof%》
《a href=“class.asp?id=《%=rss(“id“)%》“ target=_self》《%=rss(“class“)%》《/a》
《%
rss.movenext
loop
%》
这部分应该没什么好说的,根据rss记录集循环输出一些链接。
《%
set rs=server.createobject(“adodb.recordset“)
sql=“select * from news where id=“&request.querystring(“id“)
rs.open sql,conn,1,3
rs(“hits“)=rs(“hits“)+1
rs.update
%》
这段与前面不同的是,对数据库执行了更新操作(rs.update )。
其它代码都很容易理解,有什么问题,Hi我吧

asp代码解析


bncrlf=chrB(13)&chrB(10) 二进制回车符13是换行,10是开头,这是一个完整的换行符,光有13或10是不完整的,一般我们在十进制用的是CHR(13)和10
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1) 这里面的formdata就不知道是什么东东了,一个变量,leftB就是LEFT,意思是从左边第几个字符开始读的意思,这儿是指取从第几个字符开始读取二进制
datastart=instrb(formdata,bncrlf&bncrlf)+4 这儿的instrb就是instr,一个意思用来计算字数的
dataend=instrb(datastart+1,formdata,divider)-datastart 这个同上
mydata=midb(formdata,datastart,dataend) 这儿的midb也同mid,是指从第几个字符讨取到第几个字符,跟left或right差不多,只是left是从开始的字符读到最后

如何读取ASP输出的html源代码


《%
On Error Resume Next
dim conn
dim connstr
dim webdb
webdb=“xqloginback/xqjtDatabase/xqjtdb.mdb“
Set conn = Server.CreateObject(“ADODB.Connection“)
connstr=“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=“ & Server.MapPath(““&webdb&““)
conn.Open connstr
newlist=““
set rs=server.CreateObject(“adodb.recordset“)
sql=“select id,name,addtime from new order by id desc“
rs.open sql,conn,1,1
pagesum=10
topage=clng(request(“topage“))
if topage《1 then topage=1
rs.pagesize=pagesum
if not rs.eof then
rs.absolutepage=topage
end if
no=1
do while not rs.eof and not rs.bof and pagesum》0
newlist=newlis&“《table width=’90%’ height=’25’ border=’0’ align=’center’ cellspacing=’0’》“
newlist=newlis&“《tr》“
newlist=newlis&“《td width=’539’》《a href=’new_view.asp?id=“&rs(“id“)&“’ target=’_blank’》“&rs(“name“)&“ 《/a》《/td》“
newlist=newlis&“《/tr》《/table》“
《%
rs.movenext
pagesum=pagesum-1
no=no+1
loop
Set fso = Server.CreateObject(“Scripting.FileSystemObject“)
Set templates = fso.OpenTextFile(server.MapPath(“template.html“))
str=templates.readall()’读出结果,赋值给str
set fso=nothing
set templates=nothing
str=replace(str,“$newlist$“,newlist)
fileName=“28ke.html“
Set createHtml = Server.CreateObject(“Scripting.FileSystemObject“)
Set htmlFile = createHtml.CreateTextFile(server.MapPath(fileName))
htmlFile.write(str)
set htmlFile=nothing
set createHtml=nothing
%》

asp 代码解析


《%@LANGUAGE=“VBSCRIPT“ CODEPAGE=“936“%》
《!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN“ “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“》
《html xmlns=“http://www.w3.org/1999/xhtml“》
《head》
《meta http-equiv=“Content-Type“ content=“text/html; charset=gb2312“ /》
《title》无标题文档《/title》
《/head》
《body》
《%
function ContentList()’函数 内容列表()这是有返回值的无参函数
dim SortPath
SortPath=request.QueryString(“SortPath“)’接收变量并赋值成SortPath
dim idCount’记录总数
dim pages’每页条数
if request.cookies(“Style“)=“Shopwindow“ or request.cookies(“Style“)=““ then’如果从cookies中读取的变量Style为Shopwindow或者是空的话
pages=12’每页12条记录
elseif request.cookies(“Style“)=“List“ then’再否则cookies中读取的变量Style为list的话
pages=10’每页10条记录
elseif request.cookies(“Style“)=“Brief“ then’再再否则cookies中读取的变量Style为Brief的话
pages=5’每页5条记录
end if
’对于这样的逻辑判断我认为不好 过多的if嵌套很容易出问题 用select要好的多

dim pagec’总页数
dim page’页码
page=clng(request(“Page“))’页面取整数
dim pagenc’每页显示的分页页码数量=pagenc*2+1
pagenc=2
dim pagenmax’每页显示的分页的最大页码
dim pagenmin’每页显示的分页的最小页码
dim datafrom’数据表名
datafrom=“Ameav_Products“
dim datawhere’数据条件
if SortPath《》““ then’是否查看的分类产品下面这2句原有注释讲的很清楚了ViewFlag应该是布尔型的
datawhere=“where ViewFlag and Instr(SortPath,’“&SortPath&“’)》0 “
else
datawhere=“where ViewFlag “
end if
dim sqlid’本页需要用到的id
dim Myself,PATH_INFO,QUERY_STRING’下面这几句是取得本页地址和参数的
PATH_INFO = request.servervariables(“PATH_INFO“)’地址
QUERY_STRING = request.ServerVariables(“QUERY_STRING“)’参数
if QUERY_STRING = ““ then
Myself = PATH_INFO & “?“
elseif Instr(PATH_INFO & “?“ & QUERY_STRING,“Page=“)=0 then
Myself= PATH_INFO & “?“ & QUERY_STRING & “&“
else
Myself = Left(PATH_INFO & “?“ & QUERY_STRING,Instr(PATH_INFO & “?“ & QUERY_STRING,“Page=“)-1)
end if
dim taxis’排序的语句 asc,desc
taxis=“order by id desc “
dim i’用于循环的整数
dim rs,sql’sql语句
’获取记录总数
sql=“select count(ID) as idCount from [“& datafrom &“]“ & datawhere
set rs=server.createobject(“adodb.recordset“)
rs.open sql,conn,0,1
idCount=rs(“idCount“)
if(idcount》0) then’这几句是参数调整用的mod是去余
if(idcount mod pages=0)then
pagec=int(idcount/pages)
else
pagec=int(idcount/pages)+1
end if
%》
《/body》
《/html》

下载了一个网站ASP源码,怎么打开


1.安装iis服务器,用来解析ASP源码的
2.把源码放到iis下面 通过地址栏127.0.0.1/网站目录 进行访问
如果只是打开源码的话 可以通过记事本方式打开