|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
因为ASP脚本语言非常简单,因此其代码也简单易懂,结合HTML代码,可快速地完成网站的应用程序。还无法完全实现一些企业级的功能:完全的集群、负载均横。保留为runasp.asp运转。账号暗码admin,上岸后输出代码便可实行了!!
<%@LANGUAGE="VBSCRIPT"%>
<%OptionExplicit
response.buffer=true
dimSpassword,SUserName
SUserName="admin"
Spassword="admin"
dimSQLMutiStr
dimi
dimaction
action=request.querystring("action")
IFaction="GetCode"then---------TOT
NumCodeJS
ELSE--------TOT
Response.Write("<!DOCTYPEHTMLPUBLIC""-//W3C//DTDHTML4.0Transitional//EN"">")
Response.Write("<HTML>")
Response.Write("<HEAD>")
Response.Write("<TITLE>ASPRunCodeSCRV1.0/CreateByPaintBlue.NetV37</TITLE>")
Response.Write("<METANAME=""Generator""CONTENT=""EditPlus,V37,PaintBlue.Net"">")
Response.Write("<METANAME=""Author""CONTENT=""V37,PaintBlue.Net"">")
Response.Write("<METANAME=""Keywords""CONTENT=""PaintBlue.Net,,V37,RunCode,ASP,Script,BlueIdea.COM,Lfgbox.com"">")
Response.Write("<METANAME=""Description""CONTENT=""运转ASP代码的ASP剧本!"">")
Response.Write("</HEAD>")
Response.Write("<BODYbgcolor=#D4D0C8>")
SQLMutiStr=trim(Request.Form("SQLMutiStr"))
ifsession("login")=""andaction="chkpass"then
session("login")=checkPass()
endif
ifaction="exit"thensession("login")=""
ifsession("login")="1"then
ifaction="RunCode"then
ifSQLMutiStr=""then
Response.write"没有输出要运转的代码!"
Response.write"<br><br><ahref=""javascript:window.history.back();"">前往运转页面</a><br><br>"
Response.write"<ahref=""?action=exit"">加入上岸</a>"
response.end
else
dimExeStrArr
dimre
dimtempSQL,tempSQL2
dimScriptArr,ScriptSubArr
tempSQL2=""
tempSQL=split(SQLMutiStr,vbcrlf)
ifinStr(lcase(tempSQL(0)),"language")>0then
tempSQL2=tempSQL(1)
ifubound(tempSQL)>1then
fori=1toubound(tempSQL)
tempSQL2=tempSQL2&tempSQL(i)
next
endif
tempSQL2=trim(tempSQL2)
else
tempSQL2=SQLMutiStr
endif
tempSQL2=replace(tempSQL2,"<%"&"=","<"&"%response.write")
do
tempSQL2=replace(tempSQL2,vbcrlf&vbcrlf,vbcrlf)
loopwhileinstr(tempSQL2,vbcrlf&vbcrlf)>0
tempSQL2=trim(tempSQL2)
tempSQL2="<"&"%%"&">"&tempSQL2&"<"&"%%"&">"
ScriptArr=split(tempSQL2,"%"&">")
dimub,kub
ub=ubound(ScriptArr)
fori=0toub-1
ScriptSubArr=split(ScriptArr(i),"<"&"%")
ifi>0thenresponse.write(ScriptSubArr(0))
ExeCuteIt(ScriptSubArr(1))
next
callEndProc("<fontcolor=#009900>代码运转终了!</font>")
endif
else
%>
输出要运转的ASP代码:
<FORMMETHOD=POSTACTION="?action=RunCode"style="margin:0px;">
<TEXTAREANAME="SQLMutiStr"wrap=OFFROWS="20"style="width:100%;height:100%;table-layout:fixed;word-break:break-all;"><%=Server.Htmlencode(SQLMutiStr)%></TEXTAREA>
<br>
<INPUTTYPE="button"Value="LouOut">
<INPUTTYPE="reset"Value="Clear">
<INPUTTYPE="submit"value="RunAspCode">
</FORM>
<%endif
else
callloginmain()
endif
Response.write("</BODY></HTML>")
ENDIF-------TOT
SUBloginMain()
%>
<FORMMETHOD=POSTACTION="?action=chkpass">UserName:<INPUTTYPE="text"NAME="UserName"><br>
PassWord:<INPUTTYPE="password"NAME="Runpassword"><br>
CheckCode:<INPUTTYPE="GetCode"NAME="GetCode"><imgsrc="runasp.asp?action=GetCode&Time=<%=timer()%>"><br>
<br><imgwidth=125height=0><INPUTTYPE="submit"value="Login"></FORM>
<%
EndSUB
functioncheckPass()
dimUserName,Runpassword,GetCode
dimerrinfo
checkPass=""
UserName=trim(request.form("UserName"))
Runpassword=trim(request.form("Runpassword"))
GetCode=request.form("GetCode")
ifUserName=""orRunpassword=""then
errinfo=errinfo&"<li>用户名和暗码输出不克不及为空"
endif
ifNotisnumeric(GetCode)then
errinfo=errinfo&"<li>请输出数字校验码"
endif
iferrinfo""then
callloginmain()
EndProcerrinfo
endif
ifaction="chkpass"andSession("GetCode")=int(GetCode)andUserName=SUserNameandRunpassword=Spasswordthen
Session("GetCode")=0
checkPass="1"
else
callloginmain()
EndProc"上岸失利!请从头确认准确输出"
endif
Endfunction
SUBExeCuteIt(ExString)
onerrorresumenext
Execute(ExString)
iferr.number0then
Response.write"<divstyle=""background-color:#ffeedd;padding:6px;"">"
Response.write"<hrsize=1>"
Response.write"堕落信息:<li><fontcolor=#ff0000>"&err.description&"</font>"
Response.write"<hrsize=1>"
Response.write"堕落代码:<li><fontcolor=#0000ff>"&Htmlencode(ExString)&"</font>"
Response.write"<hrsize=1></div>"
endif
onerrorgoto0
endSUB
functionHTMLEncode(reString)
dimStr:Str=reString
ifnotisnull(Str)then
Str=replace(Str,">",">")
Str=replace(Str,"<","<")
Str=Replace(Str,CHR(32),"")
Str=Replace(Str,CHR(9),"")
Str=Replace(Str,CHR(34),""")"
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=""
endif
endfunction
断点调试num=0中止
SubResponse_write(str,num)
dimistr:istr=str
diminum:inum=num
response.writestr&"<br>"
ifinum=0thenresponse.end
endsub
SUBEndProc(info)
Response.write"<hrsize=1color=#00aa00>"
Response.writeinfo
Response.write"<hrsize=1color=#00aa00><ahref=""javascript:window.history.back();"">前往运转页面</a><br><br>"
Response.write"<ahref=""?action=exit"">加入上岸</a>"
response.end
EndSUB
%>
<scriptlanguage="JScript"runat="Server">
functionGetNO(num){
varNumArray=[
]["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"]
];
varstr=[];
num=String(num).split("");
for(vari=0;i<NumArray[0].length;i++)
for(varj=0;j<num.length;j++)
str[str.length]=("0x"+NumArray[num[j]][i]);
varstr1="#definecounter_width"+j*8;
varstr2="#definecounter_height16";
returnstr1+String.fromCharCode(13,10)+str2+String.fromCharCode(13,10)+"staticunsignedcharcounter_bits[]={"+str+"}";
}
functionGetRnd(Num){
returnMath.floor(Math.random()*Math.pow(10,Num));
}
functionNumCodeJS()
{
Response.buffer=true
varzNum;
varzNum=GetRnd(4);
if(zNum<1000)zNum+=999;
Session("GetCode")=zNum;
Response.ContentType="image/x-xbitmap";
Session("GetCode")=zNum;
Response.Write(GetNO(zNum));
}
</script>
asp,你就只能等着微软给你解决,它不乐意你就只好悲催。而且asp跑在windows服务器上,windows服务器跟linux比起来简直弱爆了! |
|