欢迎光临
我们一直在努力

编写一个asp代码执行器-ASP教程,脚本编码

建站超值云服务器,限时71元/月

保存为runasp.asp运行。账号密码admin,登陆后输入代码就可执行了!!

<% @ language="vbscript" %>

<%option explicit

response.buffer=true

dim spassword,susername

susername="admin"

spassword="admin"

dim sqlmutistr

dim i

dim action

action=request.querystring("action")

if action="getcode" then ———tot

numcodejs

else ——–tot

response.write("<!doctype html public ""-//w3c//dtd html 4.0 transitional//en"">")

response.write("<html>")

response.write("<head>")

response.write("<title>asp runcode scr v1.0 / create by paintblue.net v37</title>")

response.write("<meta name=""generator"" content=""editplus,v37,paintblue.net"">")

response.write("<meta name=""author"" content=""v37,paintblue.net"">")

response.write("<meta name=""keywords"" content=""paintblue.net,,v37,runcode,asp,script,blueidea.com,lfgbox.com"">")

response.write("<meta name=""description"" content=""运行asp代码的asp脚本!"">")

response.write("</head>")

response.write("<body bgcolor=#d4d0c8>")

sqlmutistr=trim(request.form("sqlmutistr"))

if session("login")="" and action="chkpass" then

session("login")=checkpass()

end if

if action="exit" then session("login")=""

if session("login")="1" then

if action="runcode" then

if sqlmutistr="" then

response.write "没有输入要运行的代码!"

response.write "<br><br><a href=""javascript:window.history.back();"">返回运行页面</a><br><br>"

response.write "<a href=""?action=exit"">退出登陆</a>"

response.end

else

dim exestrarr

dim re

dim tempsql,tempsql2

dim scriptarr,scriptsubarr

tempsql2=""

tempsql=split(sqlmutistr,vbcrlf)

if instr(lcase(tempsql(0)),"language")>0 then

tempsql2=tempsql(1)

if ubound(tempsql)>1 then

for i=1 to ubound(tempsql)

tempsql2=tempsql2&tempsql(i)

next

end if

tempsql2=trim(tempsql2)

else

tempsql2=sqlmutistr

end if

tempsql2=replace(tempsql2,"<%"&"=","<"&"%response.write ")

do

tempsql2=replace(tempsql2,vbcrlf&vbcrlf,vbcrlf)

loop while instr(tempsql2,vbcrlf&vbcrlf)>0

tempsql2=trim(tempsql2)

tempsql2="<"&"%%"&">"&tempsql2&"<"&"%%"&">"

scriptarr=split(tempsql2,"%"&">")

dim ub,kub

ub=ubound(scriptarr)

for i=0 to ub-1

scriptsubarr=split(scriptarr(i),"<"&"%")

if i>0 then response.write (scriptsubarr(0))

executeit(scriptsubarr(1))

next

call endproc("<font color=#009900>代码运行完毕!</font>")

end if

else

%>

输入要运行的asp代码:

<form method=post action="?action=runcode" style="margin:0px;">

<textarea name="sqlmutistr" wrap=off rows="20" style="width:100%;height:100%;table-layout:fixed;word-break:break-all;"><%=server.htmlencode(sqlmutistr)%></textarea>

<br>

<input type="button" onclick="window.location.href=?action=exit;" value="louout">

<input type="reset" value="clear">

<input type="submit" value="run aspcode">

</form>

<% end if

else

call loginmain()

end if

response.write ("</body></html>")

end if ——-tot

sub loginmain()

%>

<form method=post action="?action=chkpass">&nbsp;username:<input type="text" name="username"><br>

&nbsp;password:<input type="password" name="runpassword"><br>

checkcode:<input type="getcode" name="getcode"><img src="runasp.asp?action=getcode&time=<%=timer()%>"><br>

<br><img width=125 height=0><input type="submit" value=" login "></form>

<%

end sub

function checkpass()

dim username,runpassword,getcode

dim errinfo

checkpass=""

username=trim(request.form("username"))

runpassword=trim(request.form("runpassword"))

getcode=request.form("getcode")

if username="" or runpassword="" then

errinfo=errinfo&"<li>用户名和密码输入不能为空"

end if

if not isnumeric(getcode) then

errinfo=errinfo&"<li>请输入数字校验码"

end if

if errinfo<>"" then

call loginmain()

endproc errinfo

end if

if action="chkpass" and session("getcode")=int(getcode) and username=susername and runpassword=spassword then

session("getcode")=0

checkpass="1"

else

call loginmain()

endproc "登陆失败!请重新确认正确输入"

end if

end function

sub executeit(exstring)

on error resume next

execute(exstring)

if err.number<>0 then

response.write "<div style=""background-color: #ffeedd;padding: 6px;"">"

response.write "<hr size=1>"

response.write "出错信息:<li><font color=#ff0000>"&err.description&"</font>"

response.write "<hr size=1>"

response.write "出错代码:<li><font color=#0000ff>"&htmlencode(exstring)&"</font>"

response.write "<hr size=1></div>"

end if

on error goto 0

end sub

function htmlencode(restring)

dim str:str=restring

if not isnull(str) then

str = replace(str, ">", "&gt;")

str = replace(str, "<", "&lt;")

str = replace(str, chr(32), "&nbsp;")

str = replace(str, chr(9), "&nbsp;&nbsp;&nbsp;&nbsp;")

str = replace(str, chr(34), "&quot;") "

str = replace(str, chr(39), "")

str = replace(str, chr(13), "")

str = replace(str, chr(10) & chr(10), "</p><p> ")

str = replace(str, chr(10), "<br> ")

htmlencode = str

else

htmlencode=""

end if

end function

断点调试 num=0 中断

sub response_write(str,num)

dim istr:istr=str

dim inum:inum=num

response.write str&"<br>"

if inum=0 then response.end

end sub

sub endproc(info)

response.write "<hr size=1 color=#00aa00>"

response.write info

response.write "<hr size=1 color=#00aa00><a href=""javascript:window.history.back();"">返回运行页面</a><br><br>"

response.write "<a href=""?action=exit"">退出登陆</a>"

response.end

end sub

%>

<script language="jscript" runat="server">

function getno(num){

var numarray=[

]["0","0","0","3c","66","66","66","66","66","66","66","66","3c","0","0","0"],

["0","0","0","30","38","30","30","30","30","30","30","30","30","0","0","0"],

["0","0","0","3c","66","60","60","30","18","c","6","6","7e","0","0","0"],

["0","0","0","3c","66","60","60","38","60","60","60","66","3c","0","0","0"],

["0","0","0","30","30","38","38","34","34","32","7e","30","78","0","0","0"],

["0","0","0","7e","6","6","6","3e","60","60","60","66","3c","0","0","0"],

["0","0","0","38","c","6","6","3e","66","66","66","66","3c","0","0","0"],

["0","0","0","7e","66","60","60","30","30","18","18","c","c","0","0","0"],

["0","0","0","3c","66","66","66","3c","66","66","66","66","3c","0","0","0"],

["0","0","0","3c","66","66","66","66","7c","60","60","30","1c","0","0","0"]

];

var str=[];

num=string(num).split("");

for(var i=0;i<numarray[0].length;i++)

for(var j=0;j<num.length;j++)

str[str.length]=("0x"+numarray[num[j]][i]);

var str1="#define counter_width "+j*8;

var str2="#define counter_height 16";

return str1+string.fromcharcode(13,10)+str2+string.fromcharcode(13,10)+"static unsigned char counter_bits[]={"+str+"}";

}

function getrnd(num){

return math.floor(math.random()*math.pow(10,num));

}

function numcodejs()

{

response.buffer=true

var znum;

var znum=getrnd(4);

if (znum<1000) znum+=999;

session("getcode") = znum;

response.contenttype="image/x-xbitmap";

session("getcode") = znum;

response.write(getno(znum));

}

</script>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 编写一个asp代码执行器-ASP教程,脚本编码
分享到: 更多 (0)

相关推荐

  • 暂无文章