server

package
v0.0.0-...-d8e8c2f Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomToken

func GenerateRandomToken(url string) string

GenerateRandomToken is make scan id

func GetScan

func GetScan(sid string, options model.Options) model.Scan

GetScan is get scan information @Summary scan @Description get scan info @Accept json @Produce json @Param scanid path string true "scan id" @Success 200 {object} Res @Router /scan/{scanid} [get]

func GetScans

func GetScans()

GetScans is list of scan @Summary scan @Description show scan list @Accept json @Produce json @Success 200 {array} string @Router /scans [get]

func RunAPIServer

func RunAPIServer(options model.Options)

RunAPIServer is Running Echo server with swag

func ScanFromAPI

func ScanFromAPI(url string, rqOptions map[string]interface{}, options model.Options, sid string)

ScanFromAPI is scanning dalfox with REST API @Summary scan @Description add dalfox scan @Accept json @Produce json @Param data body Req true "json data" @Success 200 {object} Res @Router /scan [post]

Types

type Req

type Req struct {
	URL     string                 `json:"url"`
	Options map[string]interface{} `json:"options"`
}

Req is struct of request

type Res

type Res struct {
	Code int           `json:"code"`
	Msg  string        `json:"msg"`
	Data []model.Issue `json:"data"`
}

Res is struct of response

type Scans

type Scans struct {
	Code  int      `json:"code"`
	Scans []string `json:"scans"`
}

Scans is struct of scan

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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