New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/onbings/ftpsclient

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/onbings/ftpsclient

  • v0.0.0-20141101152330-1d622a86a268
  • Source
  • Go
  • Socket score

Version published
Created
Source

FTPS client for Go(lang)

Another Ftp client package for the go language with secure support.

Package FtpsClient implements a basic ftp(s) client which can be used to connect
an application to a ftp server. Only a small subset of the full FTP/FTPS specification
is supported

It is based on the work made by:
- jlaffaye 			github.com/jlaffaye/ftp
- smallfish 		github.com/smallfish/ftp
- Marco Beierer 	github.com/webguerilla/ftps

And has some other feature such as:
- Refactored with onbings coding covention
- Add secure/unsecure mode
- Add timeout support
- Add rx and tx buffer sizing support
- Add generic Ftp control send command function (SendFtpCtrlCommand) to be able to send SITE, 
  NOOP,... ftp command)
- Fix a number of problems in LIST command parsing

INSTALL

go get github.com/onbings/ftpsclient

EXAMPLE

package main

import (          
	"fmt"
	"log"
	"github.com/onbings/ftpsclient"
)

func main() {

	var FtpsClientParam_X ftpsclient.FtpsClientParam

	FtpsClientParam_X.Id_U32 = 123
	FtpsClientParam_X.LoginName_S = "mc"
	FtpsClientParam_X.LoginPassword_S = "a"
	FtpsClientParam_X.InitialDirectory_S = "/Seq"
	FtpsClientParam_X.SecureFtp_B = false
	FtpsClientParam_X.TargetHost_S = "127.0.0.1"
	FtpsClientParam_X.TargetPort_U16 = 21
	FtpsClientParam_X.Debug_B = false
	FtpsClientParam_X.TlsConfig_X.InsecureSkipVerify = true
	FtpsClientParam_X.ConnectTimeout_S64 = 2000
	FtpsClientParam_X.CtrlTimeout_S64 = 1000
	FtpsClientParam_X.DataTimeout_S64 = 5000
	FtpsClientParam_X.CtrlReadBufferSize_U32 = 0
	FtpsClientParam_X.CtrlWriteBufferSize_U32 = 0
	FtpsClientParam_X.DataReadBufferSize_U32 = 0x100000
	FtpsClientParam_X.DataWriteBufferSize_U32 = 0x100000

	FtpsClientPtr_X := ftpsclient.NewFtpsClient(&FtpsClientParam_X)
	if FtpsClientPtr_X != nil {
		Err := FtpsClientPtr_X.Connect()
		if Err == nil {
			DirEntryArray_X, Err := FtpsClientPtr_X.List()
			if Err == nil {
				for _, DirEntry_X := range DirEntryArray_X {
					fmt.Printf("(%d): %s.%s %d bytes %s\n", DirEntry_X.Type_E, DirEntry_X.Name_S, DirEntry_X.Ext_S, DirEntry_X.Size_U64, DirEntry_X.Time_X)
				}
				ReplyCode_i, ReplyMessage_S, Err := FtpsClientPtr_X.SendFtpCtrlCommand("FEAT", 211)
				fmt.Printf("feat %d %s\n", ReplyCode_i, ReplyMessage_S)
				Err = FtpsClientPtr_X.Disconnect()
			}
		}
	}
}

FAQs

Package last updated on 01 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc