Documentation ¶
Index ¶
- func CreateCampaign(campaign *Campaign) (err error)
- func CreateCredential(credential *Credential) (err error)
- func CreateFakeCreds(h *Honeypot, source *Source) (credentials string, err error)
- func CreateHit(hit *Hit) (err error)
- func CreateListener(listener *Listener) (err error)
- func CreateSource(source *Source) (err error)
- func DeleteCampaign(campaign *Campaign, id int) (err error)
- func DeleteHit(hit *Hit, id int) (err error)
- func DeleteListener(listener *Listener, id int) (err error)
- func DeleteSource(source *Source, id int) (err error)
- func GetCampaign(campaign *Campaign, id int) (err error)
- func GetCampaigns(campaigns *[]Campaign) (err error)
- func GetHit(hit *Hit, id int) (err error)
- func GetHits(hits *[]Hit) (err error)
- func GetHoneypots(honeypots *[]Honeypot) (err error)
- func GetListener(listener *Listener, id int) (err error)
- func GetListeners(listeners *[]Listener) (err error)
- func GetSource(source *Source, id int) (err error)
- func GetSources(sources *[]Source) (err error)
- func UpdateCampaign(campaign *Campaign, id int) (err error)
- func UpdateListener(listener *Listener, id int) (err error)
- func UpdateSource(source *Source, id int) (err error)
- type Campaign
- type Credential
- type Hit
- type HitType
- type Honeypot
- type Listener
- type ListenerType
- type Source
- type SourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCampaign ¶
CreateCampaign creates a campaign in the database
func CreateCredential ¶
func CreateCredential(credential *Credential) (err error)
CreateCredential creates a source in the database
func CreateFakeCreds ¶
CreateFakeCreds creates randomly-generated fake credentials and returns a string with the data
func CreateListener ¶
CreateListener creates a listener in the database
func CreateSource ¶
CreateSource creates a source in the database
func DeleteCampaign ¶
DeleteCampaign deletes a campaign in the database
func DeleteListener ¶
DeleteListener deletes a listener in the database
func DeleteSource ¶
DeleteSource deletes a source in the database
func GetCampaign ¶
GetCampaign gets a campaign in the database corresponding to id
func GetCampaigns ¶
GetCampaigns gets all campaigns in database
func GetHoneypots ¶
GetHoneypots gets all hits in database
func GetListener ¶
GetListener gets a listener in the database corresponding to id
func GetListeners ¶
GetListeners gets all listeners in database
func GetSources ¶
GetSources gets all sources in database
func UpdateCampaign ¶
UpdateCampaign updates a campaign in the database
func UpdateListener ¶
UpdateListener updates a listener in the database
func UpdateSource ¶
UpdateSource updates a source in the database
Types ¶
type Campaign ¶
type Campaign struct { ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` Name string `json:"name" validate:"required"` Honeypots []Honeypot `json:"honeypots"` Hits []Hit `json:"hits"` }
Campaign model
func (*Campaign) BeforeSave ¶
BeforeSave hook validates campaign
type Credential ¶
type Credential struct { ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required"` HoneypotID uint `json:"honeypotId" validate:"required"` }
Credential model
func (*Credential) BeforeSave ¶
func (c *Credential) BeforeSave() (err error)
BeforeSave hook validates credential
func (*Credential) Validate ¶
func (c *Credential) Validate() error
Validate validates struct fields
type Hit ¶
type Hit struct { ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` CampaignID uint `json:"campaignId" validate:"required"` CredentialID *uint `json:"credentialId"` Email *string `json:"email"` HoneypotID uint `json:"honeypotId" validate:"required"` ListenerID uint `json:"listenerId" validate:"required"` SourceID uint `json:"sourceId" validate:"required"` IPAddress *string `json:"ipAddress"` Type HitType `json:"type" validate:"required"` }
Hit model
type Honeypot ¶
type Honeypot struct { ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` Name string `json:"name" validate:"required"` CampaignID uint `json:"campaignId"` Credentials []Credential `json:"credentials"` ListenerID uint `json:"listenerId" validate:"required"` SourceID uint `json:"sourceId" validate:"required"` }
Honeypot model
func (*Honeypot) AfterCreate ¶
AfterCreate creates and save the fake Pastebin credentials if the Honeypot has a Pastebin Source
func (*Honeypot) BeforeSave ¶
BeforeSave hook validates honeypot
func (*Honeypot) BeforeUpdate ¶
BeforeUpdate creates and save the fake Pastebin credentials if the Honeypot has a Pastebin Source
type Listener ¶
type Listener struct { ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` Name string `json:"name" validate:"required"` Type uint `json:"type" validate:"required"` URL *string `json:"url"` Email *string `json:"email"` }
Listener model
func (*Listener) BeforeSave ¶
BeforeSave hook validates listener
type ListenerType ¶
type ListenerType int
ListenerType defines the different listener types
const ( LoginListener ListenerType = iota + 1 SocialListener )
Enumerate various listeners
type Source ¶
type Source struct { ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` Name string `gorm:"not null" json:"name" validate:"required"` Type uint `json:"type" validate:"required"` APIKey *string `json:"apiKey"` Email *string `json:"email"` Honeypots []Honeypot `json:"honeypots"` PastebinURLs pq.StringArray `gorm:"type:varchar(100)[]" json:"pastebinUrls"` }
Source model
func (*Source) BeforeSave ¶
BeforeSave hook validates source
type SourceType ¶
type SourceType int
SourceType defines the different fake OSINT sources
const ( FacebookSource SourceType = iota + 1 LinkedInSource PastebinSource )
Enumerate various actions