/usr/share/pyftpd/speed_module.py is in pyftpd 0.8.5+nmu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | from speed_config import *
from utils import myfnmatch
def got_user(username, session, sessions):
return 331, "Give me password", "", "", -1, 1
def got_pass(username, password, session, sessions):
for i in speedlist:
if myfnmatch(username, i[0]):
session.limit_retr_speed = float(i[1])
session.limit_stor_speed = float(i[2])
return 530, "Sorry", -1, 1
|