core

package
v0.0.0-...-da1de94 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2014 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP = "http"
	FTP  = "ftp"
)

Variables

This section is empty.

Functions

func HttpHeadRequest

func HttpHeadRequest(url string, timeout string) (*http.Response, error)

use: HttpHeadRequest("http://www.baidu.com/", "1s")

Types

type Report

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

func NewReport

func NewReport(id int, ip string, protocol string, port int) Report

func (*Report) Add

func (r *Report) Add(key string, val interface{})

func (*Report) CatchError

func (r *Report) CatchError(err error)

func (Report) Dump

func (r Report) Dump()

type Task

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

func NewTask

func NewTask(id int, ip string, ports []int, useSSL bool) Task

func (*Task) AddPort

func (t *Task) AddPort(port int)

func (*Task) GetIp

func (t *Task) GetIp() string

func (*Task) GetPorts

func (t *Task) GetPorts() []int

func (*Task) GetProtocol

func (t *Task) GetProtocol() string

func (*Task) GetUrl

func (t *Task) GetUrl(port int) string

type Worker

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

func NewWorker

func NewWorker(id int, task *Task, reports *[]Report, timeout string) Worker

func (Worker) ScanFtp

func (w Worker) ScanFtp() (int, error)

func (Worker) ScanHttp

func (w Worker) ScanHttp()

Jump to

Keyboard shortcuts

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