File: cwd_module.py

package info (click to toggle)
pyftpd 0.8.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 524 kB
  • ctags: 448
  • sloc: python: 2,748; sh: 80; makefile: 43
file content (12 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
from cwd_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 cwdlist:
        if myfnmatch(username, i[0]):
            session.cwd = i[1]
    return 530, "Sorry", -1, 1