db

package
v0.0.0-...-64f8f7d Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MongoDBName   = "mongo"
	AuthMechanism = "auth_mechanism"
)
View Source
var (
	MssqlName = "mssql"
)
View Source
var (
	MysqlName = "mysql"
)
View Source
var (
	PostgresName = "postgres"
)
View Source
var (
	RedisName = "redis"
)

Functions

func Connect

func Connect(driverName string, dataSourceName string, timeout time.Duration) (ok bool, err error)

Connect connects to a db and checks if the credentials are valid or not

func ConnectMongoDB

func ConnectMongoDB(addr string, c model.Credential, timeout time.Duration) (ok bool, err error)

ConnectMongoDB connects to mongodb srvs https://docs.mongodb.com/manual/reference/connection-string/

func ConnectMssql

func ConnectMssql(addr string, c model.Credential, timeout time.Duration) (bool, error)

ConnectMssql connects to maria or mysql srvs

func ConnectMysql

func ConnectMysql(addr string, c model.Credential, timeout time.Duration) (bool, error)

ConnectMysql connects to maria or mysql srvs

func ConnectPostgres

func ConnectPostgres(addr string, c model.Credential, timeout time.Duration) (bool, error)

ConnectPostgres connects to a db and checks if the credentials are valid or not

func ConnectRedis

func ConnectRedis(addr string, c model.Credential, timeout time.Duration) (ok bool, err error)

ConnectRedis connects to maria or Redis srvs

Types

type MongoDB

type MongoDB struct {
	//stuff
	Host string
	Port int

	// Options
	StopIfSuccess     bool
	StopIfNetErr      bool
	LogFailedAttempts bool
	// contains filtered or unexported fields
}

func NewMongoDB

func NewMongoDB(host string, port int, sleep time.Duration, timeout time.Duration, logAttempts bool) *MongoDB

NewMongoDB creates a new MongoDB Bruter

func (*MongoDB) Add

func (bruter *MongoDB) Add(cred model.Credential)

Add uses a credential pair for the connection blocking !

func (*MongoDB) Close

func (bruter *MongoDB) Close()

Close signals the target to cease all activity.

func (*MongoDB) GoStart

func (bruter *MongoDB) GoStart(threads int, outChan chan model.Result, errChan chan model.Err)

GoStart defines the amout of handlers per target and sets the out and err channels

type Mssql

type Mssql struct {
	//stuff
	Host string
	Port int

	// Options
	StopIfSuccess     bool
	StopIfNetErr      bool
	LogFailedAttempts bool
	// contains filtered or unexported fields
}

Mssql is the bruter

func NewMssql

func NewMssql(host string, port int, sleep time.Duration, timeout time.Duration, logAttempts bool) *Mssql

NewMssql creates a new Mssql Bruter

func (*Mssql) Add

func (bruter *Mssql) Add(cred model.Credential)

Add uses a credential pair for the connection blocking !

func (*Mssql) Close

func (bruter *Mssql) Close()

Close signals the target to cease all activity.

func (*Mssql) GoStart

func (bruter *Mssql) GoStart(threads int, outChan chan model.Result, errChan chan model.Err)

GoStart defines the amout of handlers per target and sets the out and err channels

type Mysql

type Mysql struct {
	//stuff
	Host string
	Port int

	// Options
	StopIfSuccess     bool
	StopIfNetErr      bool
	LogFailedAttempts bool
	// contains filtered or unexported fields
}

Mysql defines config for a specific target, which can be checked with credentials

func NewMysql

func NewMysql(host string, port int, sleep time.Duration, timeout time.Duration, logAttempts bool) *Mysql

NewMysql creates a new Mysql Bruter

func (*Mysql) Add

func (bruter *Mysql) Add(cred model.Credential)

Add uses a credential pair for the connection blocking !

func (*Mysql) Close

func (bruter *Mysql) Close()

Close signals the target to cease all activity.

func (*Mysql) GoStart

func (bruter *Mysql) GoStart(threads int, outChan chan model.Result, errChan chan model.Err)

GoStart defines the amout of handlers per target and sets the out and err channels

type Postgres

type Postgres struct {
	//stuff
	Host string
	Port int

	// Options
	StopIfSuccess     bool
	StopIfNetErr      bool
	LogFailedAttempts bool
	// contains filtered or unexported fields
}

Postgres is the bruter

func NewPostgres

func NewPostgres(host string, port int, sleep time.Duration, timeout time.Duration, logAttempts bool) *Postgres

NewPostgres creates a new Postgres Bruter

func (*Postgres) Add

func (bruter *Postgres) Add(cred model.Credential)

Add uses a credential pair for the connection blocking !

func (*Postgres) Close

func (bruter *Postgres) Close()

Close signals the target to cease all activity.

func (*Postgres) GoStart

func (bruter *Postgres) GoStart(threads int, outChan chan model.Result, errChan chan model.Err)

GoStart defines the amout of handlers per target and sets the out and err channels

type Redis

type Redis struct {
	//stuff
	Host string
	Port int

	// Options
	StopIfSuccess     bool
	StopIfNetErr      bool
	LogFailedAttempts bool
	// contains filtered or unexported fields
}

Redis defines config for a specific target, which can be checked with credentials

func NewRedis

func NewRedis(host string, port int, sleep time.Duration, timeout time.Duration, logAttempts bool) *Redis

NewRedis creates a new Redis Bruter

func (*Redis) Add

func (bruter *Redis) Add(cred model.Credential)

Add uses a credential pair for the connection blocking !

func (*Redis) Close

func (bruter *Redis) Close()

Close signals the target to cease all activity.

func (*Redis) GoStart

func (bruter *Redis) GoStart(threads int, outChan chan model.Result, errChan chan model.Err)

GoStart defines the amout of handlers per target and sets the out and err channels

Jump to

Keyboard shortcuts

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