optsmb

package
v0.0.0-...-8d0f603 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPort = 445
View Source
const HelpMsg = `` /* 1015-byte string literal not displayed */

Variables

This section is empty.

Functions

func CalculateSMB3EncryptionKey

func CalculateSMB3EncryptionKey(user, domain, hash string, sessionKey, ntProofStr []byte) []byte

func FormatFingerprintData

func FormatFingerprintData(f *smb.SMBFingerprint) string

func GatherSMBInfoToMap

func GatherSMBInfoToMap(targets []string, port int) map[string]*smb.SMBFingerprint

func GetSMBInfo

func GetSMBInfo(host string, port int) (f *smb.SMBFingerprint)

func IsAdminShareWritable

func IsAdminShareWritable(s *smb.Session) bool

Types

type Options

type Options struct {
	Targets struct {
		TARGETS []string `description:"Provide target IP/FQDN/FILE"`
	} `positional-args:"yes"`

	Connection struct {
		Username string `short:"u" description:"Provide username (or FILE)"`
		Password string `short:"p" description:"Provide password (or FILE)"`
		NTLM     string `short:"H" long:"hashes" description:"authenticate with NTLM hash"`
		Domain   string `short:"d" long:"domain" description:"provide domain"`
		Port     int    `long:"port" default:"445" description:"Provide SMB port"`
	} `group:"Connection Options" description:"Connection Options"`

	Shares bool   `long:"shares" description:"list open shares"`
	Exec   string `short:"x" long:"exec" description:"execute a command by creating a service via RPC"`
	Client bool   `long:"client" description:"Open a client to the remote machine"`
	// contains filtered or unexported fields
}

func (*Options) Run

func (o *Options) Run()

Jump to

Keyboard shortcuts

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