zetascan

package
v0.0.0-...-10d30f1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	ApiMethod string

	DnsMethod string
	DnsType   string
	// contains filtered or unexported fields
}

Api struct for key, URL and method

func (Api) GetConf

func (myapi Api) GetConf() string

Return the API key used

func (Api) Init

func (myapi Api) Init(apiKey string, ipcheck bool) (myapi2 Api, err error)

Init specify an authentication key for authentication

func (Api) IsBlackList

func (myapi Api) IsBlackList(response *JsonRecord) (status bool)

IsBlackList return if a result matched a blacklist

func (Api) IsMatch

func (myapi Api) IsMatch(response *JsonRecord) (status bool)

isMatch return if a result matched a whitelist/blacklist

func (Api) IsWhiteList

func (myapi Api) IsWhiteList(response *JsonRecord) (status bool)

IsWhiteList return if a result matched a whitelist

func (Api) ParseDNS

func (myapi Api) ParseDNS(results []net.IP) (data JsonRecord, err error)

Preform a DNS query against the zetascan API

func (Api) Query

func (myapi Api) Query(query string) (m JsonRecord, err error)

Query a domain/IP via any method (text, html, json, jsonx, dns)

func (Api) QueryDNS

func (myapi Api) QueryDNS(query string, retry int) (json []net.IP, err error)

Preform a DNS query against the zetascan API

func (Api) Score

func (myapi Api) Score(response *JsonRecord) (score float64)

Return the score if a result matched a whitelist/blacklist on the MTA/default score

func (Api) ToggleSSL

func (myapi Api) ToggleSSL(ssl bool) (str string)

Toggle SSL support

func (Api) Verify

func (myapi Api) Verify(status bool, verbose bool) (totalResults []Results, err error)

Verify a query to zetascan is returning valid data

func (Api) WebScore

func (myapi Api) WebScore(response *JsonRecord) (score float64)

Return the score if a result matched a whitelist/blacklist on the Webscore value

type JsonExtended

type JsonExtended struct {
	ASNum   string     `json:"ASNum"`
	Route   string     `json:"route"`
	Country string     `json:"country"`
	Domain  string     `json:"domain"`
	State   string     `json:"state"`
	Time    string     `json:"time"`
	Reason  JsonReason `json:"reason"`
}

type JsonReason

type JsonReason struct {
	Class       string `json:"class"`
	Rule        string `json:"rule"`
	Type        string `json:"type"`
	Name        string `json:"name"`
	Source      string `json:"source"`
	Port        string `json:"port"`
	SourcePort  string `json:"sourceport"`
	Destination string `json:"destination"`
}

type JsonRecord

type JsonRecord struct {
	Results       JsonResults `json:"results"`
	ExecutionTime int64       `json:"executionTime"`
	Status        string      `json:"status"`
}

type JsonResults

type JsonResults []struct {
	Item       string       `json:"item"`
	Found      bool         `json:"found"`
	Score      float64      `json:"score"`
	WebScore   float64      `json:"webscore"`
	FromSubnet bool         `json:"fromSubnet"`
	Sources    []string     `json:"sources"`
	Wl         bool         `json:"wl"`
	Wldata     string       `json:"wldata"`
	Extended   JsonExtended `json:"extended"`
}

type Query

type Query struct {
	// contains filtered or unexported fields
}

type Results

type Results struct {
	IP          string
	Match       bool
	Expected    bool
	TimeElapsed int64
	Length      int
}

Jump to

Keyboard shortcuts

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