mirror of
https://github.com/9001/copyparty.git
synced 2026-06-18 20:22:27 -06:00
added a flag to allow setting an ftp banner
This commit is contained in:
parent
6e75faa623
commit
187f843b75
|
|
@ -1519,6 +1519,7 @@ def add_ftp(ap):
|
|||
ap2.add_argument("--ftp-wt", metavar="SEC", type=int, default=7, help="grace period for resuming interrupted uploads (any client can write to any file last-modified more recently than \033[33mSEC\033[0m seconds ago)")
|
||||
ap2.add_argument("--ftp-nat", metavar="ADDR", type=u, default="", help="the NAT address to use for passive connections")
|
||||
ap2.add_argument("--ftp-pr", metavar="P-P", type=u, default="", help="the range of TCP ports to use for passive connections, for example \033[32m12000-13000")
|
||||
ap2.add_argument("--ftp-banner", metavar="BANNER", type=u, default="copyparty ftpd", help="banner to send before ftp login")
|
||||
|
||||
|
||||
def add_webdav(ap):
|
||||
|
|
|
|||
|
|
@ -629,7 +629,7 @@ class Ftpd(object):
|
|||
FtpHandler.hub = h2.hub = hub
|
||||
FtpHandler.args = h2.args = hub.args
|
||||
FtpHandler.authorizer = h2.authorizer = FtpAuth(hub)
|
||||
|
||||
FtpHandler.banner = self.args.ftp_banner
|
||||
if self.args.ftp_pr:
|
||||
p1, p2 = [int(x) for x in self.args.ftp_pr.split("-")]
|
||||
if self.args.ftp and self.args.ftps:
|
||||
|
|
|
|||
Loading…
Reference in a new issue