Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DnsTxtDownload ¶
type DnsTxtDownload struct { }
DnsTxtDownload is an empty struct used to satisfy the Downloader interface.
func NewDnsTxtDownloader ¶
func NewDnsTxtDownloader() *DnsTxtDownload
Create a new DNS TXT record downloader.
func (*DnsTxtDownload) DownloadExec ¶
func (d *DnsTxtDownload) DownloadExec(hostname string)
DownloadExec makes repeated TXT lookups to i.hostname, where i is incremented from 0 until no record is returned. The TXT record is base64 decoded and added to the data to be saved.
This excellent idea came from @breenmachine https://github.com/breenmachine/dnsftp
type Downloader ¶
type Downloader interface {
DownloadExec(location string)
}
Define the Downloader interface.
type HttpDownload ¶
type HttpDownload struct {
// contains filtered or unexported fields
}
Define an HTTP Download struct that implements the Downloader interface.
func NewHttpDownloader ¶
func NewHttpDownloader(agent string) *HttpDownload
Create a new HTTP Downloader.
func (*HttpDownload) DownloadExec ¶
func (h *HttpDownload) DownloadExec(url string)
Download a file from the given URL using the given User Agent.
Click to show internal directories.
Click to hide internal directories.