runasp.asp が実行されるように保存します。管理者は、登録後に入力コードを入力すると実行できます。
<% @ LANGUAGE="VBSCRIPT" %>
<%明示的なオプション
応答.バッファ=true
dim パスワード、SUserName
SUserName="管理者"
パスワード=「管理者」
dim SQLMutiStr
薄暗い私
薄暗いアクション
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 / PaintBlue.Net V37 で作成</TITLE>")
Response.Write("<META NAME=""Generator"" CONTENT=""EditPlus,V37,PaintBlue.Net"">")
Response.Write("<META NAME=""著者"" 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"))
session("login")="" かつ action="chkpass" の場合
session("ログイン")=checkPass()
終了する場合
if action="exit" then session("login")=""
session("login")="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
薄暗い
dim tempSQL、tempSQL2
dim ScriptArr、ScriptSubArr
tempSQL2=""
tempSQL=split(SQLMutiStr,vbcrlf)
if inStr(lcase(tempSQL(0)),"言語")>0 then
tempSQL2=tempSQL(1)
ubound(tempSQL)>1 の場合
for i=1 から ubound(tempSQL)
tempSQL2=tempSQL2&tempSQL(i)
次
終了する場合
tempSQL2=トリム(tempSQL2)
それ以外
tempSQL2=SQLMutiStr
終了する場合
tempSQL2=replace(tempSQL2,"<%"&"=","<"&"%response.write ")
する
tempSQL2=replace(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;"><%=Server .Htmlencode(SQLMutiStr)%></TEXTAREA>
<br>
<INPUT TYPE="ボタン" onclick="window.location.href='?action=exit';"値 = "ルーアウト">
<INPUT TYPE="リセット" 値="クリア">
<INPUT TYPE="submit" value="Aspコードの実行">
</FORM>
<% 終了の場合
それ以外
loginmain() を呼び出す
終了する場合
Response.write ("</BODY></HTML>")
END IF '------TOT
SUBloginMain()
%>
<FORM METHOD=POST ACTION="?action=chkpass"> ユーザー名:<INPUT TYPE="text" NAME="ユーザー名"><br>
パスワード:<INPUT TYPE="パスワード" NAME="実行パスワード"><br>
チェックコード:<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()
の終了
dim ユーザー名、実行パスワード、GetCode
薄暗いエラー情報
checkPass=""
ユーザー名=trim(request.form("ユーザー名"))
Runpassword=trim(request.form("Runpassword"))
GetCode=request.form("GetCode")
UserName="" または Runpassword="" の場合
errinfo=errinfo&"<li>用户名と秘密输入は空にはできません"
終了する場合
Not isnumeric(GetCode) の場合
errinfo=errinfo&"<li>请输入数字校验码"
終了する場合
if errinfo<>"" then
loginmain() を呼び出す
EndProc エラー情報
終了する場合
action="chkpass" かつ Session("GetCode")=int(GetCode) かつ UserName=SUserName かつ Runpassword=Spassword の場合
セッション("GetCode")=0
checkPass="1"
それ以外
loginmain() を呼び出す
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)
dim Str:Str=reString
isnull(Str) でない場合は、
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> ")
HTMLエンコード = 文字列
それ以外
HTMLエンコード=""
終了する場合
end function
'断点调试 num=0 中断
サブ Response_write(str,num)
ディム istr:istr=str
ディム inum:inum=num
response.write str&"<br>"
inum=0 の場合、response.end
エンドサブ
SUB EndProc(情報)
Response.write "<hr size=1 color=#00aa00>"
Response.書き込み情報
Response.write "<hr size=1 color=#00aa00><a href=""javascript:window.history.back();"">回帰行页面</a><br><br>"
Response.write "<a href=""?action=exit"">退出登陆</a>"
応答.終了
エンドサブ
%>
<script language="JScript" runat="サーバー">
関数 GetNO(数値){
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(数値){
return Math.floor(Math.random()*Math.pow(10,Num));
}
関数 NumCodeJS()
{
Response.buffer=true
var zNum;
var zNum=GetRnd(4);
if (zNum<1000) zNum+=999;
セッション("GetCode") = zNum;
Response.ContentType="画像/x-xbitmap";
セッション("GetCode") = zNum;
Response.Write(GetNO(zNum));
}
</script>