儲存為runasp.asp運作
。
<%選項顯式
響應.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));
}
</腳本>