database

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteTaskById

func DeleteTaskById(taskId int64)

func GetCurrentTasks

func GetCurrentTasks() *[]Task

func GetMongoClient

func GetMongoClient() (*mongo.Client, error)

func ReassignTask

func ReassignTask(tasksCollection *mongo.Collection, task *Task)

func StartDatabase

func StartDatabase()

func UpdateTaskById

func UpdateTaskById(taskId int64, status string)

Types

type ConfigFields

type ConfigFields struct {
	ID      primitive.ObjectID `bson:"_id" json:"id,omitempty"`
	BaseURL string             `json:"baseurl"`
	Token   string             `json:"token"`
}

type DnsResults

type DnsResults struct {
	DomainName   string   `bson:"domain_name" json:"domain_name"`
	DnsReconList string   `bson:"dns_recon_list" json:"dns_recon_list"`
	Dmarc        []string `bson:"dmarc" json:"dmarc"`
	Spf          []string `bson:"spf" json:"spf"`
	DnsSec       bool     `json:"dns_sec"`
}

type NmapLogs

type NmapLogs struct {
	Taskprogress struct {
		Percent string `xml:"percent,attr"`
	} `xml:"taskprogress"`
}

type OsintResults

type OsintResults struct {
	Host       string `bson:"host" json:"host"`
	ShodanData string `bson:"shodan_data" json:"shodan_data"`
	Reputation string `bson:"reputation" json:"reputation"`
}

type Result

type Result struct {
	TaskId int64  `bson:"task_id" json:"task_id"`
	Result string `json:"result"`
}

type Secrets

type Secrets struct {
	Otx    string `json:"otx"`
	Shodan string `bson:"shodan" json:"shodan"`
}

type Task

type Task struct {
	ID                    primitive.ObjectID `bson:"_id" json:"id,omitempty"`
	Name                  string             `json:"name"`
	TaskId                int64              `bson:"task_id" json:"task_id"`
	Status                string             `json:"status"`
	ContainerId           string             `bson:"container_id" json:"container_id"`
	Content               TaskContent        `json:"content"`
	SecretData            TaskSecret         `bson:"secret_data" json:"secret_data"`
	NmapResult            string             `bson:"nmap_result" json:"nmap_result"`
	OpenvasResult         string             `bson:"openvas_result" json:"openvas_result"`
	OpenvasTaskId         string             `bson:"openvas_task_id" json:"openvas_task_id"`
	DnsResult             []DnsResults       `bson:"dns_result" json:"dns_result"`
	OsintResult           []OsintResults     `bson:"osint_result" json:"osint_result"`
	NameInfo              string             `bson:"name_info" json:"name_info"`
	ServiceScreenShotData string             `bson:"service_screen_shot_data" json:"service_screen_shot_data"`
	Percent               int                `json:"percent"`
	SshPort               string             `bson:"ssh_port" json:"ssh_port"`
}

type TaskArg

type TaskArg struct {
	NmapParams    string              `json:"nmap_params"`
	Hosts         string              `json:"hosts"`
	Excludes      string              `json:"excludes"`
	Dns           []string            `json:"dns"`
	Configuration string              `json:"configuration"`
	DisabledNvts  map[string][]string `bson:"disabled_nvts" json:"disabled_nvts"`
}

type TaskContent

type TaskContent struct {
	Function string  `json:"function"`
	Args     TaskArg `json:"args"`
}

type TaskSecret

type TaskSecret struct {
	Osint Secrets `bson:"osint" json:"osint"`
}

Jump to

Keyboard shortcuts

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