data

package
v0.0.0-...-f6bba44 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(password, email string) (bool, string, string)

func CheckIfAdmin

func CheckIfAdmin(adminId string) bool

func CheckIfOwner

func CheckIfOwner(userId, ownerId string) bool

func CreateApiKey

func CreateApiKey(a Api) error

apikey ownerid active created_at updated_at

func CreateMothership

func CreateMothership(m Mothership) error

func CreateUser

func CreateUser(u User) error

userid ownerid username email password active anonymous verified admin created_at updated_at

func DBCreateMinion

func DBCreateMinion(b Bot) error

func DBCreateMultipleImplants

func DBCreateMultipleImplants(minions []Minion) error

func DBViewMinion

func DBViewMinion(minionId string)

func DeactivateKey

func DeactivateKey(ownerId, key string) error

func DeactivateMothership

func DeactivateMothership(msid string) error

func MarkUserAsInActive

func MarkUserAsInActive(ownerId, userId string) error

func UpdateKey

func UpdateKey(ownerId, apiKey string) error

func ValidateApiKey

func ValidateApiKey(key, ownerId string) bool
if !true{
  //Do the Thing
}

Types

type Api

type Api struct {
	ApiKey    string `json:"apikey"`
	OwnerId   string `json:"ownerid"`
	Active    string `json:"active"`
	CreatedAt string `json:"createdat"`
	UpdatedAt string `json:"updatedat"`
}

func ListApiKeys

func ListApiKeys(active bool) ([]Api, error)

func ViewApiKey

func ViewApiKey(keyId string) (*Api, error)

type Minion

type Minion struct {
	MinionId     string `json:"minionid"`
	Name         string `json:"name"`
	UName        string `json:"unsme"`
	UserId       string `json:"uid"`
	GroupId      string `json:"groupid"`
	HomeDir      string `json:"homedir"`
	MinionType   string `json:"miniontype"` //bot or agent
	Os           string `json:"ostype"`
	Description  string `json:"description"`
	Installed    bool   `json:"installed"`
	MotherShipId string `json:"mothershipid"`
	Ip           net.Ip `json:"ip"`
	OwnerId      string `json:'ownerid'`
	LastSeen     string `json:"lastseen"`
	CreatedAt    string `json:"createdat"`
	UpdatedAt    string `json:"updatedat"`
}

A minion is rat of your choosing, from rootkit to a normal agent

This is what wheagle uses it as an agent

func DbListMinions

func DbListMinions(ownerId string) ([]Minion, error)

type Mothership

type Mothership struct {
	OwnerId     string `json:"ownerid"`
	Name        string `json:"name"`
	MId         string `json:"mothershipid"`
	IpAddress   net.IP //`json:"mothershipaddres"`
	Port        int    `json:"port"`
	Description string `json:"description"`
	Active      bool   `json:"active"`
	CreatedAt   string `json:"createdat"`
	UpdatedAt   string `json:"updatedat"`
}

func ListMotherShips

func ListMotherShips(active bool) ([]Mothership, error)

func ViewMothership

func ViewMothership(msid string) (*Mothership, error)

type User

type User struct {
	UserId    string
	OwnerId   string
	UserName  string
	Email     string
	Password  string
	Active    bool
	Anonymous bool
	Verify    bool
	Admin     bool
	CreatedAt string
	UpdatedAt string
}

func AdminListUsers

func AdminListUsers(active bool) ([]User, error)

func ListAllUsers

func ListAllUsers(active bool) ([]User, error)

func ListMyUsers

func ListMyUsers(ownerId string, active bool) ([]User, error)

func ViewUser

func ViewUser(userId string) (*User, error)

Jump to

Keyboard shortcuts

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