core

package
v0.0.0-...-385ba70 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const ADMIN_DIR = "admin"
View Source
const (
	API_PATH = "api/v1"
)
View Source
const BLACKLIST_HITS_LIMIT = 10
View Source
const BLACKLIST_JAIL_TIME_SECS = 10 * 60
View Source
const EXEC_NAME = "pwndrop"
View Source
const INSTALL_DIR = "/usr/local/pwndrop"

Variables

Functions

func GenerateTLSCertificate

func GenerateTLSCertificate(common string) (*tls.Certificate, error)

func LoadTLSCertificate

func LoadTLSCertificate(pub_path string, pkey_path string) (*tls.Certificate, error)

Types

type BlacklistItem

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

type CertDb

type CertDb struct {
	AutocertMgr autocert.Manager
}

func NewCertDb

func NewCertDb(cache_dir string) (*CertDb, error)

func (*CertDb) SetManagedHostnames

func (cdb *CertDb) SetManagedHostnames(hosts ...string)

type Http

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

func NewHttp

func NewHttp(srv *Server) (*Http, error)

func (*Http) ServeHTTP

func (s *Http) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Nameserver

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

func NewNameserver

func NewNameserver(ch_exit *chan bool) (*Nameserver, error)

type Server

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

func NewServer

func NewServer(host string, port_plain int, port_tls int, enable_letsencrypt bool, enable_dns bool, ch_exit *chan bool) (*Server, error)

func (*Server) FileExists

func (s *Server) FileExists(url string) bool

func (*Server) GetFile

func (s *Server) GetFile(url string) (*storage.DbFile, int, error)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Service

type Service struct {
	Daemon daemon.Daemon
}

func (*Service) Install

func (service *Service) Install() bool

func (*Service) Remove

func (service *Service) Remove() bool

func (*Service) Start

func (service *Service) Start() bool

func (*Service) Status

func (service *Service) Status() bool

func (*Service) Stop

func (service *Service) Stop() bool

type WebDav

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

func NewWebDav

func NewWebDav(srv *Server) (*WebDav, error)

func (*WebDav) Handler

func (s *WebDav) Handler() http.Handler

type WebDavFS

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

func (*WebDavFS) Mkdir

func (fs *WebDavFS) Mkdir(ctx context.Context, name string, perm os.FileMode) error

func (*WebDavFS) OpenFile

func (fs *WebDavFS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error)

func (*WebDavFS) RemoveAll

func (fs *WebDavFS) RemoveAll(ctx context.Context, name string) error

func (*WebDavFS) Rename

func (fs *WebDavFS) Rename(ctx context.Context, oldName, newName string) error

func (*WebDavFS) Stat

func (fs *WebDavFS) Stat(ctx context.Context, name string) (os.FileInfo, error)

type WebDavFile

type WebDavFile struct {
	webdav.File
	// contains filtered or unexported fields
}

func (*WebDavFile) Close

func (f *WebDavFile) Close() error

func (*WebDavFile) Read

func (f *WebDavFile) Read(p []byte) (n int, err error)

func (*WebDavFile) Readdir

func (f *WebDavFile) Readdir(count int) ([]os.FileInfo, error)

func (*WebDavFile) Seek

func (f *WebDavFile) Seek(offset int64, whence int) (int64, error)

func (*WebDavFile) Stat

func (f *WebDavFile) Stat() (os.FileInfo, error)

func (*WebDavFile) Write

func (f *WebDavFile) Write(p []byte) (n int, err error)

type WebDavFileInfo

type WebDavFileInfo struct {
	os.FileInfo
	// contains filtered or unexported fields
}

func (*WebDavFileInfo) IsDir

func (fi *WebDavFileInfo) IsDir() bool

func (*WebDavFileInfo) ModTime

func (fi *WebDavFileInfo) ModTime() time.Time

func (*WebDavFileInfo) Mode

func (fi *WebDavFileInfo) Mode() os.FileMode

func (*WebDavFileInfo) Name

func (fi *WebDavFileInfo) Name() string

func (*WebDavFileInfo) Size

func (fi *WebDavFileInfo) Size() int64

func (*WebDavFileInfo) Sys

func (fi *WebDavFileInfo) Sys() interface{}

Jump to

Keyboard shortcuts

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