当前位置: 移动技术网 > IT编程>开发语言>.net > 编写一个asp代码执行器

编写一个asp代码执行器

2018年10月03日  | 移动技术网IT编程  | 我要评论

保存为run.asp运行。账号密码admin,登陆后输入代码就可执行了!!

<% @ 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("<!doctype html public ""-//w3c//dtd html 4.0 transitional//en"">")
    response.write("<html>")
    response.write("<head>")
    response.write("<title>asp runcode scr v1.0 / create by paintblue.net v37</title>")
    response.write("<meta name=""generator"" content=""editplus,v37,paintblue.net"">")
    response.write("<meta name=""author"" 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"))
    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 "<br><br><a href=""javascript:window.history.back();"">返回运行页面</a><br><br>"
                    response.write "<a href=""?action=exit"">退出登陆</a>"
                    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

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网