Skip to content
Implementation of the FTPS protocol for Golang.
Branch: master
Clone or download
Latest commit 60e520f Jul 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE formatted license Jul 30, 2014
README.md added some information to the README file Jul 30, 2014
entry.go some changes / everything works now Jul 29, 2014
ftps.go added error checking Jul 13, 2018
ftps_test.go

README.md

FTPS Implementation for Go

Information

This implementation does not implement the full FTP/FTPS specification. Only a small subset.

I have not done a security review of the code, yet. Therefore no guarantee is given. It would be nice if somebody could do a security review and report back if the implementation is vulnerable.

Installation

go get github.com/webguerilla/ftps

Usage

ftps := new(FTPS)

ftps.TLSConfig.InsecureSkipVerify = true // often necessary in shared hosting environments
ftps.Debug = true

err := ftps.Connect("localhost", 21)
if err != nil {
	panic(err)
}

err = ftps.Login("username", "password")
if err != nil {
	panic(err)
}

directory, err := ftps.PrintWorkingDirectory()
if err != nil {
	panic(err)
}
log.Printf("Current working directory: %s", directory)

err = ftps.Quit()
if err != nil {
	panic(err)
}

Credits

This work was inspired by the work of jlaffaye (https://github.com/jlaffaye/ftp) and smallfish (https://github.com/smallfish/ftp).

You can’t perform that action at this time.