app

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionCookieName = "session"
	SessionKey        = "session"
)

Variables

View Source
var (
	Sessions *syncmap.Map
	Pages    []*Page
)
View Source
var (
	Flag      = "FLAG{SSRF=>WAFbypass=>XSS}"
	SecretURL = "/admin_53cr37api/:id"
)

Functions

func DBInit

func DBInit()

func GetWebPage

func GetWebPage(url string) string

func LoggerMiddleware

func LoggerMiddleware(next http.Handler) http.Handler

func SessionMiddleware

func SessionMiddleware(next http.Handler) http.Handler

Types

type Handler

type Handler struct {
	Template *template.Template
}

func (*Handler) Admin

func (h *Handler) Admin(w http.ResponseWriter, r *http.Request)

func (*Handler) Index

func (h *Handler) Index(w http.ResponseWriter, r *http.Request)

func (*Handler) NewPage

func (h *Handler) NewPage(w http.ResponseWriter, r *http.Request)

func (*Handler) View

func (h *Handler) View(w http.ResponseWriter, r *http.Request)

type Page

type Page struct {
	Url  string
	Body string
}

type Session

type Session struct {
	Token   string
	User    *User
	Message string
}

func GetSession

func GetSession(r *http.Request) *Session

func NewSession

func NewSession() (*Session, error)

type User

type User struct {
	Pages []*Page
}

Jump to

Keyboard shortcuts

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