保存为runasp.asp运行。账号密码admin,登陆后输入代码就执行了!
<% @ LANGUAGE="VBSCRIPT" %>
<%选项显式
响应.buffer=true
昏暗的密码,S用户名
S用户名=“管理员”
密码=“管理员”
昏暗的 SQLMutiStr
昏暗的我
暗淡的行动
action=request.querystring("action")
IF action="GetCode" then '---------TOT
数字代码JS
其他'--------TOT
Response.Write("<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 过渡 //EN"">")
响应.Write("<HTML>")
响应.Write("<HEAD>")
Response.Write("<TITLE>ASP RunCode SCR V1.0 / 由 PaintBlue.Net V37 创建</TITLE>")
Response.Write("<META NAME=""生成器"" CONTENT=""EditPlus,V37,PaintBlue.Net"">")
Response.Write("<META NAME=""作者"" CONTENT=""V37,PaintBlue.Net"">")
Response.Write("<META NAME=""关键字"" CONTENT=""PaintBlue.Net,,V37,RunCode,ASP,Script,BlueIdea.COM,Lfgbox.com"">")
Response.Write("<META NAME=""Description"" CONTENT=""运行ASP代码的ASP脚本!"">")
响应.Write("</HEAD>")
Response.Write("<BODY bgcolor=#D4D0C8>")
SQLMutiStr=trim(Request.Form("SQLMutiStr"))
如果会话(“登录”)=“”和操作=“chkpass”那么
会话(“登录”)= checkPass()
结束如果
如果操作=“退出”则会话(“登录”)=“”
如果会话(“登录”)=“1”那么
如果操作=“运行代码”那么
如果 SQLMutiStr="" 那么
Response.write "没有输入要运行的代码!"
Response.write "<br><br><a href=""javascript:window.history.back();"">返回运行页面</a><br><br>"
Response.write "<a href=""?action=exit"">退出登陆</a>"
响应.结束
别的
昏暗的ExeStrArr
昏暗的雷
昏暗的 tempSQL,tempSQL2
暗淡 ScriptArr,ScriptSubArr
临时SQL2=""
tempSQL=split(SQLMutiStr,vbcrlf)
如果 inStr(lcase(tempSQL(0)),"语言")>0 那么
tempSQL2=tempSQL(1)
如果 ubound(tempSQL)>1 那么
对于 i=1 到 ubound(tempSQL)
tempSQL2=tempSQL2&tempSQL(i)
下一个
结束如果
tempSQL2=修剪(tempSQL2)
别的
tempSQL2=SQLMutiStr
结束如果
tempSQL2=替换(tempSQL2,"<%"&"=","<"&"%response.write ")
做
tempSQL2=替换(tempSQL2,vbcrlf&vbcrlf,vbcrlf)
循环 while instr(tempSQL2,vbcrlf&vbcrlf)>0
tempSQL2=修剪(tempSQL2)
tempSQL2="<"&"%%"&">"&tempSQL2&"<"&"%%"&">"
ScriptArr=split(tempSQL2,"%"&">")
昏暗的乌布,库布
ub=ubound(ScriptArr)
对于 i=0 到 ub-1
ScriptSubArr=split(ScriptArr(i),"<"&"%")
如果 i>0 则response.write (ScriptSubArr(0))
ExeCuteIt(ScriptSubArr(1))
下一个
call EndProc("<font color=#009900>代码运行结束!</font>")
结束如果
别的
%>
输入要运行的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;"><%=服务器.Htmlencode(SQLMutiStr)%></TEXTAREA>
<br>
<INPUT TYPE="button" onclick="window.location.href='?action=exit';"值=“LouOut”>
<输入类型=“重置”值=“清除”>
<INPUT TYPE="提交" value="运行 AspCode">
</表格>
<% 结束如果
别的
调用登录main()
结束如果
Response.write("</BODY></HTML>")
END IF '--------TOT
SUB 登录Main()
%>
<FORM METHOD=POST ACTION="?action=chkpass"> 用户名:<INPUT TYPE="text" NAME="用户名"><br>
密码:<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="登录"></FORM>
<%
结束SUB
函数checkPass()
暗淡用户名、运行密码、获取代码
暗淡错误信息
检查通行证=“”
用户名=trim(request.form("用户名"))
运行密码=trim(request.form("运行密码"))
GetCode=请求.form("GetCode")
如果用户名=“”或运行密码=“”那么
errinfo=errinfo&"<li>用户名和密码输入不能为空"
结束如果
如果不是数值型(GetCode) 那么
errinfo=errinfo&"<li>请输入数字校验码"
结束如果
如果 errinfo<>"" 那么
调用登录main()
结束过程错误信息
结束如果
如果 action="chkpass" 且 Session("GetCode")=int(GetCode) 且 UserName=SUserName 且 Runpassword=Spassword 那么
会话(“获取代码”)=0
检查密码=“1”
别的
调用登录main()
EndProc "登陆失败!请重新确认正确输入"
结束如果
结束函数
SUB ExeCuteIt(ExString)
出错时继续下一步
执行(ExString)
如果 err.number<>0 那么
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>”
结束如果
出错时转到 0
结束 SUB
函数 HTMLEncode(reString)
暗淡的 Str:Str=reString
如果不是 isnull(Str) 那么
Str = 替换(Str,“>”,“>”)
Str = 替换(Str, "<", "<")
Str = 替换(Str, CHR(32), " ")
Str = 替换(Str, CHR(9), " ")
Str = 替换(Str, CHR(34), """) ' "
Str = 替换(Str, CHR(39), "'") ' '
Str = 替换(Str, CHR(13), "")
Str = 替换(Str, CHR(10) & CHR(10), "</P><P> ")
Str = 替换(Str, CHR(10), "<BR> ")
HTML 编码 = Str
别的
HTML编码=“”
结束如果
end function
'断点调试 num=0 中断
子 Response_write(str,num)
暗淡 isstr:istr=str
点明:inum=num
响应.write str&"<br>"
如果 inum=0 则response.end
结束子
SUB EndProc(信息)
Response.write "<hr size=1 color=#00aa00>"
响应.写入信息
Response.write "<hr size=1 color=#00aa00><a href=""javascript:window.history.back();"">返回运行页面</a><br><br>"
Response.write "<a href=""?action=exit"">退出登陆</a>"
响应.结束
结束SUB
%>
<脚本语言=“JScript”runat=“服务器”>
函数 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+"}";
}
函数 GetRnd(Num){
return Math.floor(Math.random()*Math.pow(10,Num));
}
函数 NumCodeJS()
{
响应.buffer=true
var zNum;
var zNum=GetRnd(4);
如果(zNum<1000)zNum+=999;
会话(“获取代码”)= zNum;
Response.ContentType="image/x-xbitmap";
会话(“获取代码”)= zNum;
Response.Write(GetNO(zNum));
}
</脚本>