domain

package
v0.0.0-...-c630b08 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: GPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const Cooldown = 6

Cooldown is how long to wait when "intrusion" is returned

Variables

This section is empty.

Functions

func CheckDomain

func CheckDomain(domain string, client *http.Client) error

CheckDomain checks the categorization of a domain and returns a propmt when a domain is found that the user might want.

func ParseFile

func ParseFile(filePath string) error

ParseFile takes a path and runs every domain through the CheckDomain function

func ParseKeywords

func ParseKeywords(keywords []string) error

ParseKeywords takes a list of keywords and scrapes expireddomains.com for keywords and passes them into CheckDomain

Types

type Categorization

type Categorization struct {
	// URL of domain
	URL string `json:"url"`
	// Error is returned if there is an error checking the domain
	Error     string `json:"error"`
	ErrorType string `json:"errorType"`
	// Unrated checks if the domain is uncategorized
	Unrated    bool `json:"unrated"`
	TrackingID int  `json:"curtrackingid"`
	Locked     bool `json:"locked"`
	Multiple   bool `json:"multiple"`
	// RateDate is when the domain was last rated
	RateDate string `json:"ratedate"`
	// Categorization gives the categorization of the domain in an `a` tag
	Categorization    string `json:"categorization"`
	ThreatRiskLevel   string `json:"threatrisklevel"`
	ThreatRiskLevelEn string `json:"threatrisklevel_en"`
	Linkable          bool   `json:"linkable"`
}

Categorization is a struct that is returned by bluecoat when asked to classify a domain

type Domain

type Domain struct {
	URL            string
	Categorization string
}

Domain is a description of the domain with categorization

func NewDomain

func NewDomain(url, categorization string) *Domain

NewDomain creates a new Domain struct that can be used to check availability and purchase domains

func (*Domain) PromptPurchase

func (d *Domain) PromptPurchase()

PromptPurchase is a CUI for purchasing a domain. It uses the helpers given to actually purchase it.

type ExpiredDomain

type ExpiredDomain struct {
	Site          string
	Registrars    string
	Backlinks     int
	PopBacklinks  int
	Birth         int
	ArchiveOrg    int
	SimilarWeb    string
	Dmoz          string
	DNSCom        string
	DNSNet        string
	DNSOrg        string
	DNSDe         string
	TLDRegistered int
	Related       string
	List          string
	Status        string
}

ExpiredDomain is returned from scraping expireddomains.com

type Registrars

type Registrars interface {
	// GetName returns the name of the registrar
	GetName() string

	// IsAvailable returns if the domain is available and the price
	IsAvailable(domain string) (bool, uint64, error)

	// Purchase takes a domains and buys it
	Purchase(domain string) error
}

Registrars is an interface for purchasing domain names

Jump to

Keyboard shortcuts

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