models

package
v0.0.0-...-354b61f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	ID                  int64                 `json:"-"`
	OffensiveSecurityID int64                 `gorm:"index:idx_document_offensive_security_id" json:"-"`
	ExploitUniqueID     string                `gorm:"-" csv:"id" json:"-"`
	DocumentURL         string                `gorm:"type:varchar(255)" csv:"file" json:"document_url"`
	Description         string                `gorm:"type:text" csv:"description" json:"description"`
	Date                OffensiveSecurityTime `gorm:"type:time" csv:"date" json:"date"`
	Author              string                `gorm:"type:varchar(255)" csv:"author" json:"author"`
	Type                string                `gorm:"type:varchar(255)" csv:"type" json:"type"`
	Platform            string                `gorm:"type:varchar(255)" csv:"platform" json:"palatform"`
	Port                string                `gorm:"type:varchar(255)" csv:"port" json:"port"`
}

type Exploit

type Exploit struct {
	ID                int64              `json:"-"`
	ExploitType       ExploitType        `gorm:"type:varchar(255)" json:"exploit_type"`
	ExploitUniqueID   string             `gorm:"type:varchar(255);index:idx_exploit_exploit_unique_id" json:"exploit_unique_id"`
	URL               string             `gorm:"type:varchar(255)" json:"url"`
	Description       string             `gorm:"type:text" json:"description"`
	CveID             string             `gorm:"type:varchar(255);index:idx_exploit_cve_id" json:"cve_id"`
	OffensiveSecurity *OffensiveSecurity `json:"offensive_security"`
	GitHubRepository  *GitHubRepository  `json:"github_repository"`
	InTheWild         *InTheWild         `json:"in_the_wild"`
}

type ExploitType

type ExploitType string
var (
	OffensiveSecurityType ExploitType = "OffensiveSecurity"
	GitHubRepositoryType  ExploitType = "GitHub"
	AwesomePocType        ExploitType = "AwesomePoc"
	InTheWildType         ExploitType = "InTheWild"
)

type GitHubRepoJSON

type GitHubRepoJSON struct {
	Name        string    `json:"name"`
	FullName    string    `json:"full_name"`
	Description string    `json:"description"`
	URL         string    `json:"html_url"`
	Star        int       `json:"stargazers_count"`
	Fork        int       `json:"forks_count"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type GitHubRepository

type GitHubRepository struct {
	ID        int64     `json:"-"`
	ExploitID int64     `gorm:"index:idx_git_hub_repository_exploit_id" json:"-"`
	Star      int       `json:"star"`
	Fork      int       `json:"fork"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type InTheWild

type InTheWild struct {
	ID        int64     `json:"-"`
	ExploitID int64     `gorm:"index:idx_in_the_wild_exploit_id" json:"-"`
	TimeStamp time.Time `json:"timestamp"`
	Source    string    `gorm:"type:varchar(255)" json:"source"`
	Type      string    `gorm:"type:varchar(255)" json:"type"`
}

type MitreXML

type MitreXML struct {
	Vulnerability []struct {
		CVE        string `xml:"CVE"`
		References []struct {
			AttrType    string `xml:"Type,attr"`
			URL         string `xml:"URL"`
			Description string `xml:"Description"`
		} `xml:"References>Reference"`
	} `xml:"Vulnerability"`
}

type OffensiveSecurity

type OffensiveSecurity struct {
	ID        int64      `json:"-"`
	ExploitID int64      `gorm:"index:idx_offensive_security_exploit_id" json:"-"`
	Document  *Document  `json:"document"`
	ShellCode *ShellCode `json:"shell_code"`
	Paper     *Paper     `json:"paper"`
}

type OffensiveSecurityTime

type OffensiveSecurityTime struct {
	time.Time
}

func (*OffensiveSecurityTime) Scan

func (date *OffensiveSecurityTime) Scan(value interface{}) error

func (*OffensiveSecurityTime) UnmarshalCSV

func (date *OffensiveSecurityTime) UnmarshalCSV(csv string) (err error)

func (OffensiveSecurityTime) Value

func (date OffensiveSecurityTime) Value() (driver.Value, error)

type Paper

type Paper struct {
	ID                  int64                 `json:"-"`
	OffensiveSecurityID int64                 `gorm:"index:idx_paper_offensive_security_id" json:"-"`
	ExploitUniqueID     string                `gorm:"-" csv:"id" json:"-"`
	PaperURL            string                `gorm:"type:varchar(255)" csv:"file" json:"paper_path"`
	Description         string                `gorm:"type:text" csv:"description" json:"description"`
	Date                OffensiveSecurityTime `csv:"date" json:"date"`
	Author              string                `gorm:"type:varchar(255)" csv:"author" json:"author"`
	Type                string                `gorm:"type:varchar(255)" csv:"type" json:"type"`
	Platform            string                `gorm:"type:varchar(255)" csv:"platform" json:"platform"`
	Language            string                `gorm:"type:varchar(255)" csv:"language" json:"language"`
}

type ShellCode

type ShellCode struct {
	ID                  int64                 `json:"-"`
	OffensiveSecurityID int64                 `gorm:"index:idx_shell_code_offensive_security_id" json:"-"`
	ExploitUniqueID     string                `gorm:"-" csv:"id" json:"-"`
	ShellCodeURL        string                `gorm:"type:varchar(255)" csv:"file" json:"shell_code_url"`
	Description         string                `gorm:"type:text" csv:"description" json:"description"`
	Date                OffensiveSecurityTime `gorm:"type:time" csv:"date" json:"date"`
	Author              string                `gorm:"type:varchar(255)" csv:"author" json:"author"`
	Platform            string                `gorm:"type:varchar(255)" csv:"platform" json:"platform"`
}

Jump to

Keyboard shortcuts

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