smbprotocol

package
v0.0.0-...-ff3e7b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTINUE             = 0
	MAX_DEPTH_STOP       = 1
	PERMISSION_DENY_STOP = 2
	OTHER                = 3
	NO_MORE_FOLDERS      = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File_A

type File_A struct {
	Name string `validate:"printascii"`

	HumanPath  string `validate:"printascii"`
	FolderPath string `validate:"printascii"`
	Size       int64
	// contains filtered or unexported fields
}

type Folder_A

type Folder_A struct {
	Depth int
	Name  string // Folder Name

	HumanPath       string // Host + Share + Folder Path relative to root
	ListOfFolders   []Folder_A
	ListOfFiles     []File_A
	ReadAccess      bool
	WriteAccess     bool
	NumberOfFiles   int
	NumberOfFolders int
	NumberOfItems   int
	Stop_reason     int
	// contains filtered or unexported fields
}

type Share

type Share struct {
	ShareName     string
	Hidden        bool // Anything with $ after the name is hidden
	SMBConnection *smb2.Session
	Mount         *smb2.Share
	Mounted       bool
	UserFlags     *options.UserFlags
	UserRead      bool
	UserWrite     bool
	GuestRead     bool
	GuestWrite    bool
	ListOfFolders []Folder_A
	ListOfFiles   []File_A
}

func (*Share) DirWalk

func (s *Share) DirWalk(host string) error

func (*Share) InitializeShare

func (s *Share) InitializeShare(q *smb2.Session, f *options.UserFlags) error

func (*Share) ListFilesRoot

func (s *Share) ListFilesRoot(host string) error

func (*Share) UnmountShare

func (s *Share) UnmountShare()

type Target

type Target struct {
	HostDestination  string
	ResolvedIP       net.IP
	UserFlag         *options.UserFlags
	ConnectionTCP    net.Conn
	ConnectionTCP_OK bool
	ConnectionSMB    *smb2.Session
	ConnectionSMB_OK bool
	GuestOnly        bool
	GuestAccess      bool
	ListOfShares     []Share
}

func (*Target) CloseSMBSession

func (r *Target) CloseSMBSession() error

func (*Target) CloseTCP

func (r *Target) CloseTCP() error

func (*Target) GetShareList

func (r *Target) GetShareList() ([]string, error)

func (*Target) GuestAccessCheck

func (r *Target) GuestAccessCheck() bool

func (*Target) InitSMBAuth

func (r *Target) InitSMBAuth() error

func (*Target) InitTCP

func (r *Target) InitTCP() error

func (*Target) Initialize

func (r *Target) Initialize(f *options.UserFlags, target string) error

TODO, add verbose

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL