I deployed a ftp server based on Filezilla-server.
I have a lot of user to create for the ftp server.
I found that all of the user informations is configured in users.xml file like this format:
<user name="xxxx" enabled="true">
<mount_point tvfs_path="/" native_path="D:\FTP\xxx" access="1" recursive="2" />
<rate_limits inbound="unlimited" outbound="unlimited" session_inbound="unlimited" session_outbound="unlimited" />
<allowed_ips></allowed_ips>
<disallowed_ips></disallowed_ips>
<description></description>
<group>gourp_1</group>
<password index="1">
<hash>HnO0erHdwRyVIIxpv/no2x0ndEabWXcGAng5ZYtWqdI</hash>
<salt>/KsGZYHTRbMZTZefHm4TK232AQIc3RBI+gwilQgOM0M</salt>
<iterations>100000</iterations>
</password>
</user>
I try to use Python to generate the users.xml file to batch create users, but I don't know what's the encrypt type of the password. and I don't know how to generate the hash and salt field。
I tried to use sha512 like this:
hashlib.sha512(p + salt).hexdigest()
but it didn't work.