add passiveports options

This commit is contained in:
luelista 2023-07-08 12:22:27 +02:00 committed by GitHub
parent 9284a177dc
commit e5ca24ac91

View File

@ -137,6 +137,7 @@ func main() {
pass = flag.String("pass", "123456", "Password for login")
port = flag.Int("port", 2121, "Port")
host = flag.String("host", "localhost", "Host")
passiveports = flag.String("passiveports", "2130-2134", "Passive ports")
)
flag.Parse()
if *target == "" {
@ -149,6 +150,7 @@ func main() {
Port: *port,
Hostname: *host,
Auth: &server.SimpleAuth{Name: *user, Password: *pass},
PassivePorts: *passiveports,
}
log.Printf("Starting ftp server on %v:%v", opts.Hostname, opts.Port)