checks

package
v0.0.0-...-5995b2f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GlobalTimeout time.Duration
	Creds         map[uint]map[string]map[string]string

	// Global list of all current CredData
	CredLists []CredData
)

Functions

func FileDifference

func FileDifference(fileName string, fileContent string) (int, error)

FileDifference returns the percentage difference between the contents of the filename passed and the contents of the file passed.

func FileHash

func FileHash(fileName string) (string, error)

FileHash returns the sha256sum of the filename passed.

func GetFile

func GetFile(fileName string) (string, error)

func RunCheck

func RunCheck(teamID uint, teamIP, boxIP, boxName string, check Check, wg *sync.WaitGroup, resChan chan Result)

func StringHash

func StringHash(fileContent string) (string, error)

Types

type Check

type Check interface {
	Run(uint, string, chan Result)
	FetchName() string
	FetchDisplay() string
	FetchIP() string
	FetchAnonymous() bool
}

checks for each service

type Cmd

type Cmd struct {
	Command string
	Regex   string
	// contains filtered or unexported fields
}

func (Cmd) FetchAnonymous

func (c Cmd) FetchAnonymous() bool

func (Cmd) FetchDisplay

func (c Cmd) FetchDisplay() string

func (Cmd) FetchIP

func (c Cmd) FetchIP() string

func (Cmd) FetchName

func (c Cmd) FetchName() string

func (Cmd) Run

func (c Cmd) Run(teamID uint, boxIp string, res chan Result)

type CredData

type CredData struct {
	Name      string
	Usernames []string
	DefaultPw string
}

type Dns

type Dns struct {
	Record []DnsRecord
	// contains filtered or unexported fields
}

func (Dns) FetchAnonymous

func (c Dns) FetchAnonymous() bool

func (Dns) FetchDisplay

func (c Dns) FetchDisplay() string

func (Dns) FetchIP

func (c Dns) FetchIP() string

func (Dns) FetchName

func (c Dns) FetchName() string

func (Dns) Run

func (c Dns) Run(teamID uint, boxIp string, res chan Result)

type DnsRecord

type DnsRecord struct {
	Kind   string
	Domain string
	Answer []string
}

type Ftp

type Ftp struct {
	File []FtpFile
	// contains filtered or unexported fields
}

func (Ftp) FetchAnonymous

func (c Ftp) FetchAnonymous() bool

func (Ftp) FetchDisplay

func (c Ftp) FetchDisplay() string

func (Ftp) FetchIP

func (c Ftp) FetchIP() string

func (Ftp) FetchName

func (c Ftp) FetchName() string

func (Ftp) Run

func (c Ftp) Run(teamID uint, boxIp string, res chan Result)

type FtpFile

type FtpFile struct {
	Name  string
	Hash  string
	Regex string
}

type Imap

type Imap struct {
	Encrypted bool
	// contains filtered or unexported fields
}

func (Imap) FetchAnonymous

func (c Imap) FetchAnonymous() bool

func (Imap) FetchDisplay

func (c Imap) FetchDisplay() string

func (Imap) FetchIP

func (c Imap) FetchIP() string

func (Imap) FetchName

func (c Imap) FetchName() string

func (Imap) Run

func (c Imap) Run(teamID uint, boxIp string, res chan Result)

type Ldap

type Ldap struct {
	Domain    string
	Encrypted bool
	// contains filtered or unexported fields
}

func (Ldap) FetchAnonymous

func (c Ldap) FetchAnonymous() bool

func (Ldap) FetchDisplay

func (c Ldap) FetchDisplay() string

func (Ldap) FetchIP

func (c Ldap) FetchIP() string

func (Ldap) FetchName

func (c Ldap) FetchName() string

func (Ldap) Run

func (c Ldap) Run(teamID uint, boxIp string, res chan Result)

type Ping

type Ping struct {
	Count           int
	AllowPacketLoss bool
	Percent         int
	// contains filtered or unexported fields
}

func (Ping) FetchAnonymous

func (c Ping) FetchAnonymous() bool

func (Ping) FetchDisplay

func (c Ping) FetchDisplay() string

func (Ping) FetchIP

func (c Ping) FetchIP() string

func (Ping) FetchName

func (c Ping) FetchName() string

func (Ping) Run

func (c Ping) Run(teamID uint, boxIp string, res chan Result)

type Rdp

type Rdp struct {
	// contains filtered or unexported fields
}

func (Rdp) FetchAnonymous

func (c Rdp) FetchAnonymous() bool

func (Rdp) FetchDisplay

func (c Rdp) FetchDisplay() string

func (Rdp) FetchIP

func (c Rdp) FetchIP() string

func (Rdp) FetchName

func (c Rdp) FetchName() string

func (Rdp) Run

func (c Rdp) Run(teamID uint, boxIp string, res chan Result)

type Result

type Result struct {
	Name   string `json:"name,omitempty"`
	Box    string `json:"box,omitempty"`
	Status bool   `json:"status,omitempty"`
	IP     string `json:"ip,omitempty"`
	Error  string `json:"error,omitempty"`
	Debug  string `json:"debug,omitempty"`
}

type Smb

type Smb struct {
	Domain string
	Share  string
	File   []smbFile
	// contains filtered or unexported fields
}

func (Smb) FetchAnonymous

func (c Smb) FetchAnonymous() bool

func (Smb) FetchDisplay

func (c Smb) FetchDisplay() string

func (Smb) FetchIP

func (c Smb) FetchIP() string

func (Smb) FetchName

func (c Smb) FetchName() string

func (Smb) Run

func (c Smb) Run(teamID uint, boxIp string, res chan Result)

type Smtp

type Smtp struct {
	Sender    string
	Receiver  string
	Body      string
	Encrypted bool
	// contains filtered or unexported fields
}

func (Smtp) FetchAnonymous

func (c Smtp) FetchAnonymous() bool

func (Smtp) FetchDisplay

func (c Smtp) FetchDisplay() string

func (Smtp) FetchIP

func (c Smtp) FetchIP() string

func (Smtp) FetchName

func (c Smtp) FetchName() string

func (Smtp) Run

func (c Smtp) Run(teamID uint, boxIp string, res chan Result)

type Sql

type Sql struct {
	Kind  string
	Query []queryData
	// contains filtered or unexported fields
}

func (Sql) FetchAnonymous

func (c Sql) FetchAnonymous() bool

func (Sql) FetchDisplay

func (c Sql) FetchDisplay() string

func (Sql) FetchIP

func (c Sql) FetchIP() string

func (Sql) FetchName

func (c Sql) FetchName() string

func (Sql) Run

func (c Sql) Run(teamID uint, boxIp string, res chan Result)

type Ssh

type Ssh struct {
	PrivKey     string
	BadAttempts int
	Command     []commandData
	// contains filtered or unexported fields
}

func (Ssh) FetchAnonymous

func (c Ssh) FetchAnonymous() bool

func (Ssh) FetchDisplay

func (c Ssh) FetchDisplay() string

func (Ssh) FetchIP

func (c Ssh) FetchIP() string

func (Ssh) FetchName

func (c Ssh) FetchName() string

func (Ssh) Run

func (c Ssh) Run(teamID uint, boxIp string, res chan Result)

type Tcp

type Tcp struct {
	// contains filtered or unexported fields
}

func (Tcp) FetchAnonymous

func (c Tcp) FetchAnonymous() bool

func (Tcp) FetchDisplay

func (c Tcp) FetchDisplay() string

func (Tcp) FetchIP

func (c Tcp) FetchIP() string

func (Tcp) FetchName

func (c Tcp) FetchName() string

func (Tcp) Run

func (c Tcp) Run(teamID uint, boxIp string, res chan Result)

type Vnc

type Vnc struct {
	// contains filtered or unexported fields
}

func (Vnc) FetchAnonymous

func (c Vnc) FetchAnonymous() bool

func (Vnc) FetchDisplay

func (c Vnc) FetchDisplay() string

func (Vnc) FetchIP

func (c Vnc) FetchIP() string

func (Vnc) FetchName

func (c Vnc) FetchName() string

func (Vnc) Run

func (c Vnc) Run(teamID uint, boxIp string, res chan Result)

type Web

type Web struct {
	Url    []urlData
	Scheme string
	// contains filtered or unexported fields
}

func (Web) FetchAnonymous

func (c Web) FetchAnonymous() bool

func (Web) FetchDisplay

func (c Web) FetchDisplay() string

func (Web) FetchIP

func (c Web) FetchIP() string

func (Web) FetchName

func (c Web) FetchName() string

func (Web) Run

func (c Web) Run(teamID uint, boxIp string, res chan Result)

type WinRM

type WinRM struct {
	Encrypted   bool
	BadAttempts int
	Command     []winCommandData
	// contains filtered or unexported fields
}

func (WinRM) FetchAnonymous

func (c WinRM) FetchAnonymous() bool

func (WinRM) FetchDisplay

func (c WinRM) FetchDisplay() string

func (WinRM) FetchIP

func (c WinRM) FetchIP() string

func (WinRM) FetchName

func (c WinRM) FetchName() string

func (WinRM) Run

func (c WinRM) Run(teamID uint, boxIp string, res chan Result)

Jump to

Keyboard shortcuts

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