Online Modify serv-u 4.2 User Password _fso topic

Source: Internet
Author: User
Tags chr
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&AMP;CHR) &AMP;CHR (a) &pl,user&chr (a) &AMP;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>

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.