Documentation ¶
Index ¶
- Constants
- Variables
- func BatchExtractedData(db *gorm.DB, ctx context.Context) chan *schema.ExtractedData
- func BatchScreenRecorder(db *gorm.DB, ctx context.Context) chan *schema.ScreenRecorder
- func BatchWebsocketFlows(db *gorm.DB, ctx context.Context) chan *schema.WebsocketFlow
- func BroadcastData(typeString string, data any)
- func BuildHTTPFlowQuery(db *gorm.DB, params *ypb.QueryHTTPFlowRequest) *gorm.DB
- func CallPostInitDatabase() error
- func CheckDNSLogByToken(token string, timeout ...float64) ([]*tpb.DNSLogEvent, error)
- func CheckExistGroup(db *gorm.DB, group string) (bool, error)
- func CheckHTTPLogByToken(token string, timeout ...float64) ([]*tpb.HTTPRequestTriggerNotification, error)
- func CheckICMPTriggerByLength(i int) (*tpb.ICMPTriggerNotification, error)
- func CheckRandomTriggerByToken(t string) (*tpb.RandomPortTriggerEvent, error)
- func CheckServerReachable(ctx context.Context, target string, httpCheck bool) (*tpb.CheckServerReachableResponse, error)
- func ClearCodecFlow(db *gorm.DB) error
- func ConfigureNetWork(c *ypb.GlobalNetworkConfig)
- func CopyPayloads(db *gorm.DB, payloads []*schema.Payload, group, folder string) error
- func CountRiskByRuntimeId(db *gorm.DB, runtimeId string) (uint32, error)
- func CountYakScriptByWhere(db *gorm.DB, isGroup bool, req *ypb.QueryYakScriptGroupRequest) (total int64, err error)
- func CreateHTTPFlow(opts ...CreateHTTPFlowOptions) (*schema.HTTPFlow, error)
- func CreateHTTPFlowFromHTTPWithBodySaved(isHttps bool, req *http.Request, rsp *http.Response, source string, url string, ...) (*schema.HTTPFlow, error)
- func CreateHTTPFlowFromHTTPWithBodySavedFromRaw(isHttps bool, reqRaw []byte, rspRaw []byte, source string, url string, ...) (*schema.HTTPFlow, error)
- func CreateHTTPFlowFromHTTPWithNoRspSaved(isHttps bool, req *http.Request, source string, url string, remoteAddr string, ...) (*schema.HTTPFlow, error)
- func CreateOrUpdateAliveHost(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateCodecFlow(db *gorm.DB, flow *schema.CodecFlow) error
- func CreateOrUpdateDomain(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateExecHistory(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateExecResult(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateExtractedData(db *gorm.DB, mainId int64, i interface{}) error
- func CreateOrUpdateHTTPFlow(db *gorm.DB, hash string, i *schema.HTTPFlow) (fErr error)
- func CreateOrUpdateHost(db *gorm.DB, ip string, i interface{}) error
- func CreateOrUpdateMarkdownDoc(db *gorm.DB, sid int64, name string, i interface{}) error
- func CreateOrUpdateMenuItem(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateNavigation(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdatePayload(db *gorm.DB, content, group, folder string, hitCount int64, isFile bool) error
- func CreateOrUpdatePluginGroup(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdatePort(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateProgress(db *gorm.DB, runtimeId string, i interface{}) error
- func CreateOrUpdateProject(db *gorm.DB, name string, folderID, childFolderID int64, Type string, ...) error
- func CreateOrUpdateReportRecord(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateRisk(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateScreenRecorder(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateWebFuzzerLabel(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateWebShell(db *gorm.DB, hash string, i interface{}) (*schema.WebShell, error)
- func CreateOrUpdateWebsocketFlow(db *gorm.DB, hash string, i interface{}) error
- func CreateOrUpdateYakScript(db *gorm.DB, id int64, i interface{}) error
- func CreateOrUpdateYakScriptByName(db *gorm.DB, scriptName string, i interface{}) error
- func CreateOrUpdateYakScriptByOnlineId(db *gorm.DB, onlineId int64, i interface{}) error
- func CreateRisk(u string, opts ...RiskParamsOpt) *schema.Risk
- func CreateTemporaryYakScript(t string, code string, suffix ...string) (string, error)
- func DelKey(db *gorm.DB, key interface{})
- func DeleteCodecFlow(db *gorm.DB, flowName string) error
- func DeleteDomainByID(db *gorm.DB, ids ...int64) error
- func DeleteExecHistoryAll(db *gorm.DB) error
- func DeleteExecHistoryByID(db *gorm.DB, id int64) error
- func DeleteExecResult(db *gorm.DB) error
- func DeleteExecResultByID(db *gorm.DB, id int64) error
- func DeleteExecResultByYakScriptName(db *gorm.DB, name string) error
- func DeleteExtractedDataByID(db *gorm.DB, id int64) error
- func DeleteExtractedDataByTraceId(db *gorm.DB, flowHash string) error
- func DeleteExtractedDataByTraceIds(db *gorm.DB, httpFlowHash []string) error
- func DeleteHTTPFlow(db *gorm.DB, req *ypb.DeleteHTTPFlowRequest) error
- func DeleteHTTPFlowByID(db *gorm.DB, id int64) error
- func DeleteHostByID(db *gorm.DB, id int64) error
- func DeleteMarkdownDocByID(db *gorm.DB, id int64) error
- func DeleteMenuItem(db *gorm.DB, group string, name string, mode string) error
- func DeleteMenuItemAll(db *gorm.DB) error
- func DeleteMenuItemByID(db *gorm.DB, id int64) error
- func DeleteNavigationByWhere(db *gorm.DB, req *ypb.GetAllNavigationRequest) error
- func DeletePayloadByFolder(db *gorm.DB, folder string) error
- func DeletePayloadByGroup(db *gorm.DB, group string) error
- func DeletePayloadByID(db *gorm.DB, id int64) error
- func DeletePayloadByIDs(db *gorm.DB, ids []int64) error
- func DeletePluginGroup(db *gorm.DB, group string) error
- func DeletePluginGroupByHash(db *gorm.DB, hash string) error
- func DeletePluginGroupByScriptName(db *gorm.DB, scriptName []string) error
- func DeletePluginGroupsWithNonEmptyTemporaryId(db *gorm.DB) error
- func DeletePortByID(db *gorm.DB, id int64) error
- func DeletePortsByID(db *gorm.DB, id int64) error
- func DeleteProgress(db *gorm.DB, filter *ypb.UnfinishedTaskFilter) ([]*schema.Progress, error)
- func DeleteProgressByRuntimeId(db *gorm.DB, runtimeId string) (*schema.Progress, error)
- func DeleteProjectById(db *gorm.DB, id int64) error
- func DeleteProjectByProjectName(db *gorm.DB, name string) error
- func DeleteProjectByUid(db *gorm.DB, id string) error
- func DeleteProjectKeyBareRequestAndResponse(db *gorm.DB) error
- func DeleteReportRecordByHash(db *gorm.DB, id string) error
- func DeleteReportRecordByID(db *gorm.DB, id int64) error
- func DeleteReportRecordByIDs(db *gorm.DB, ids ...int64) error
- func DeleteRiskByID(db *gorm.DB, ids ...int64) error
- func DeleteRiskByTarget(db *gorm.DB, target string)
- func DeleteScreenRecorder(db *gorm.DB, id int64) error
- func DeleteScreenRecorderByID(db *gorm.DB, id int64) error
- func DeleteWebFuzzerLabel(db *gorm.DB, hash string) error
- func DeleteWebFuzzerResponseByTaskID(db *gorm.DB, id int64) error
- func DeleteWebFuzzerTask(db *gorm.DB, id int64) error
- func DeleteWebFuzzerTaskAll(db *gorm.DB) error
- func DeleteWebFuzzerTaskByWebFuzzerIndex(db *gorm.DB, index string) error
- func DeleteWebShellByID(db *gorm.DB, ids ...int64) error
- func DeleteWebsocketFlowAll(db *gorm.DB) error
- func DeleteWebsocketFlowByID(db *gorm.DB, id int64) error
- func DeleteWebsocketFlowByWebsocketHash(db *gorm.DB, hash string) error
- func DeleteWebsocketFlowsByHTTPFlowHash(db *gorm.DB, hash string) error
- func DeleteWebsocketFlowsByHTTPFlowHashList(db *gorm.DB, hash []string) error
- func DeleteYakScript(db *gorm.DB, params *ypb.DeleteLocalPluginsByWhereRequest) *gorm.DB
- func DeleteYakScriptAll(db *gorm.DB) error
- func DeleteYakScriptByID(db *gorm.DB, id int64) error
- func DeleteYakScriptByName(db *gorm.DB, s string) error
- func DeleteYakScriptByOnlineId(db *gorm.DB, onlineId int64) error
- func DeleteYakScriptByUserID(db *gorm.DB, s int64, onlineBaseUrl string) error
- func DeleteYakScriptByWhere(db *gorm.DB) error
- func DropExtractedDataTable(db *gorm.DB)
- func DropWebsocketFlowTable(db *gorm.DB)
- func ExportHTTPFlow(db *gorm.DB, params *ypb.ExportHTTPFlowsRequest) (paging *bizhelper.Paginator, ret []*schema.HTTPFlow, err error)
- func ExportYakScript(db *gorm.DB, fileName string) error
- func ExtractTokenFromUrl(tokenUrl string) string
- func ExtractedDataFromHTTPFlow(flowHash string, ruleName string, matchResult *MatchResult, data string, ...) *schema.ExtractedData
- func FilterByQueryRisks(db *gorm.DB, params *ypb.QueryRisksRequest) (_ *gorm.DB, _ error)
- func FilterDomain(db *gorm.DB, params *ypb.QueryDomainsRequest) *gorm.DB
- func FilterHTTPFlow(db *gorm.DB, params *ypb.QueryHTTPFlowRequest) *gorm.DB
- func FilterHTTPFlowByDomain(db *gorm.DB, domain string) *gorm.DB
- func FilterHTTPFlowByRuntimeID(db *gorm.DB, runtimeID string) *gorm.DB
- func FilterHTTPFlowBySchema(db *gorm.DB, schema string) *gorm.DB
- func FilterHTTPFlowPathPrefix(db *gorm.DB, pathPrefix string) *gorm.DB
- func FilterHybridScan(db *gorm.DB, filter *ypb.HybridScanTaskFilter) *gorm.DB
- func FilterNaslScript(db *gorm.DB, params *ypb.QueryYakScriptRequest) *gorm.DB
- func FilterPort(db *gorm.DB, params *ypb.QueryPortsRequest) *gorm.DB
- func FilterProgress(db *gorm.DB, filter *ypb.UnfinishedTaskFilter) *gorm.DB
- func FilterReportRecord(db *gorm.DB, params *ypb.QueryReportsRequest) *gorm.DB
- func FilterRootScriptsWithDbModelType(scripts []*schema.NaslScript) []*schema.NaslScript
- func FilterYakScript(db *gorm.DB, params *ypb.QueryYakScriptRequest) *gorm.DB
- func FixRiskType(db *gorm.DB)
- func FuzzerResponseToHTTPFlow(db *gorm.DB, rsp *ypb.FuzzerResponse) (*schema.HTTPFlow, error)
- func Get(key interface{}) string
- func GetAllCodecFlow(db *gorm.DB) ([]*schema.CodecFlow, error)
- func GetAllMenuItem(db *gorm.DB) []*schema.MenuItem
- func GetAllNavigation(db *gorm.DB, req *ypb.GetAllNavigationRequest) []*schema.NavigationBar
- func GetCodecFlowByName(db *gorm.DB, flowName string) (*schema.CodecFlow, error)
- func GetCurrentProject(db *gorm.DB) (*schema.Project, error)
- func GetDefaultNetworkConfig() *ypb.GlobalNetworkConfig
- func GetDefaultProject(db *gorm.DB) (*schema.Project, error)
- func GetDefaultScriptFileNameByType(t string) (string, error)
- func GetDomain(db *gorm.DB, id int64) (*schema.Domain, error)
- func GetExecHistory(db *gorm.DB, id int64) (*schema.ExecHistory, error)
- func GetExecResult(db *gorm.DB, id int64) (*schema.ExecResult, error)
- func GetExtractedData(db *gorm.DB, id int64) (*schema.ExtractedData, error)
- func GetGroup(db *gorm.DB, scriptNames []string) (req []*schema.PluginGroup, err error)
- func GetHTTPFlow(db *gorm.DB, id int64) (*schema.HTTPFlow, error)
- func GetHTTPFlowByHash(db *gorm.DB, hash string) (*schema.HTTPFlow, error)
- func GetHTTPFlowByIDOrHash(db *gorm.DB, id int64, hash string) (*schema.HTTPFlow, error)
- func GetHost(db *gorm.DB, id int64) (*schema.Host, error)
- func GetHostByIP(db *gorm.DB, ip string) (*schema.Host, error)
- func GetHybridScanByTaskId(db *gorm.DB, taskId string) (*schema.HybridScanTask, error)
- func GetKey(db *gorm.DB, key interface{}) string
- func GetKeyModel(db *gorm.DB, key interface{}) (*schema.GeneralStorage, error)
- func GetMarkdownDoc(db *gorm.DB, id int64) (*schema.MarkdownDoc, error)
- func GetMarkdownDocByName(db *gorm.DB, sid int64, name string) (*schema.MarkdownDoc, error)
- func GetMenuItem(db *gorm.DB, group string, name string) (*schema.MenuItem, error)
- func GetMenuItemById(db *gorm.DB, id int64) (*schema.MenuItem, error)
- func GetNetworkConfig() *ypb.GlobalNetworkConfig
- func GetNucleiYakScriptByName(db *gorm.DB, scriptName string) (*schema.YakScript, error)
- func GetOneScreenRecorder(db *gorm.DB, req *ypb.GetOneScreenRecorderRequest) (*schema.ScreenRecorder, error)
- func GetPayloadById(db *gorm.DB, id int64) (*schema.Payload, error)
- func GetPayloadCountInGroup(db *gorm.DB, group string) int64
- func GetPayloadFirst(db *gorm.DB, group string) (*schema.Payload, error)
- func GetPayloadGroupFileName(db *gorm.DB, group string) (string, error)
- func GetPayloadsByFolder(db *gorm.DB, folder string) ([]*schema.Payload, error)
- func GetPayloadsByGroup(db *gorm.DB, group string) ([]*schema.Payload, error)
- func GetPluginByGroup(db *gorm.DB, group string) (req []*schema.PluginGroup, err error)
- func GetPort(db *gorm.DB, id int64) (*schema.Port, error)
- func GetProcessEnvKey(db *gorm.DB) []*schema.GeneralStorage
- func GetProgressByRuntimeId(db *gorm.DB, runtimeId string) (*schema.Progress, error)
- func GetProject(db *gorm.DB, params *ypb.IsProjectNameValidRequest) (*schema.Project, error)
- func GetProjectByID(db *gorm.DB, id int64) (*schema.Project, error)
- func GetProjectByName(db *gorm.DB, name string) (*schema.Project, error)
- func GetProjectByWhere(db *gorm.DB, name string, folderID, childFolderID int64, Type string, id int64) (*schema.Project, error)
- func GetProjectDetail(db *gorm.DB, id int64) (*schema.BackProject, error)
- func GetProjectKey(db *gorm.DB, key interface{}) string
- func GetProjectKeyByWhere(db *gorm.DB, key []string) ([]*schema.ProjectGeneralStorage, error)
- func GetProjectKeyModel(db *gorm.DB, key interface{}) (*schema.ProjectGeneralStorage, error)
- func GetProjectKeyWithError(db *gorm.DB, key interface{}) (string, error)
- func GetReportRecord(db *gorm.DB, id int64) (*schema.ReportRecord, error)
- func GetReportRecordByHash(db *gorm.DB, id string) (*schema.ReportRecord, error)
- func GetRisk(db *gorm.DB, id int64) (*schema.Risk, error)
- func GetRiskByHash(db *gorm.DB, hash string) (*schema.Risk, error)
- func GetRisksByRuntimeId(db *gorm.DB, runtimeId string) ([]*schema.Risk, error)
- func GetScreenRecorder(db *gorm.DB, id int64) (*schema.ScreenRecorder, error)
- func GetTemporaryProject(db *gorm.DB) (*schema.Project, error)
- func GetWebFuzzerRetryRootID(db *gorm.DB, id uint) (uint, error)
- func GetWebFuzzerTaskById(db *gorm.DB, id int) (*schema.WebFuzzerTask, error)
- func GetWebFuzzerTasksIDByRetryRootID(db *gorm.DB, root_id uint) ([]uint, error)
- func GetWebShell(db *gorm.DB, id int64) (*ypb.WebShell, error)
- func GetWebsocketFlow(db *gorm.DB, id int64) (*schema.WebsocketFlow, error)
- func GetYakScript(db *gorm.DB, id int64) (*schema.YakScript, error)
- func GetYakScriptByName(db *gorm.DB, name string) (*schema.YakScript, error)
- func GetYakScriptByOnlineID(db *gorm.DB, onlineId int64) (*schema.YakScript, error)
- func GetYakScriptByUUID(db *gorm.DB, uuid string) (*schema.YakScript, error)
- func GetYakScriptIdOrName(db *gorm.DB, id int64, name string) (*schema.YakScript, error)
- func GetYakScriptList(db *gorm.DB, id int64, ids []int64) ([]*schema.YakScript, error)
- func HTTPFlowToOnline(db *gorm.DB, hash []string) error
- func HaveReverseRisk(token string) bool
- func IgnoreYakScriptByID(db *gorm.DB, id int64, ignored bool) error
- func ImportResource(db *gorm.DB, fileName string) error
- func InitKey(db *gorm.DB, key interface{}, verbose interface{}, env bool) error
- func InitialDatabase()
- func InitializingProjectDatabase() error
- func InsertHTTPFlow(db *gorm.DB, i *schema.HTTPFlow) (fErr error)
- func IsExitScreenRecorder(db *gorm.DB, id int64, order string) (*schema.ScreenRecorder, error)
- func IsRiskExecResult(i any) (*schema.Risk, bool)
- func LoadGlobalNetworkConfig()
- func LoadPackage(typeStr string, basePath string) (*schema.YakScript, *schema.MarkdownDoc, error)
- func LoadYakitFromLocalDir(f string) error
- func LoadYakitResources(dirName string) ([]*schema.YakScript, []*schema.MarkdownDoc, error)
- func LoadYakitThirdpartySourceScripts(ctx context.Context, ghUrl string, proxy ...string) error
- func MigrateLegacyDatabase() error
- func MovePayloads(db *gorm.DB, payloads []*schema.Payload, group, folder string) error
- func NewAliveHost(u string, opts ...AliveHostParamsOpt) (*schema.AliveHost, error)
- func NewDNSLogDomain() (domain string, token string, _ error)
- func NewDNSLogDomainWithContext(ctx context.Context) (domain string, token string, _ error)
- func NewEmptyNaslScript() *schema.NaslScript
- func NewHTTPLog(i ...any) (domain string, token string, _ error)
- func NewHost(ip string) (*schema.Host, error)
- func NewLocalReverseProtoUrl(proto string) func(opts ...RiskParamsOpt) string
- func NewMenuItemByBatchExecuteConfig(raw interface{}) (*schema.MenuItem, error)
- func NewNaslScript(name, content string) *schema.NaslScript
- func NewPayload(group string, content string) *schema.Payload
- func NewPublicReverseProtoUrl(proto string) func(opts ...RiskParamsOpt) string
- func NewRandomPortTrigger(opt ...RiskParamsOpt) (token string, addr string, _ error)
- func NewReport() *schema.Report
- func NewRisk(u string, opts ...RiskParamsOpt) (*schema.Risk, error)
- func NewRiskReadRequest(db *gorm.DB, req *ypb.NewRiskReadRequest, Ids []int64) error
- func NewTemporaryYakScript(t string, code string, suffix ...string) (*schema.YakScript, error)
- func NewUnverifiedRisk(u string, token string, opts ...RiskParamsOpt) (*schema.Risk, error)
- func PayloadGroups(db *gorm.DB, search ...string) []string
- func QueryAllMenuItemByWhere(db *gorm.DB, req *ypb.QueryAllMenuItemRequest) []*schema.MenuItem
- func QueryDomain(db *gorm.DB, params *ypb.QueryDomainsRequest) (*bizhelper.Paginator, []*schema.Domain, error)
- func QueryExecHistory(db *gorm.DB, params *ypb.ExecHistoryRequest) (*bizhelper.Paginator, []*schema.ExecHistory, error)
- func QueryExecResult(db *gorm.DB, params *ypb.QueryYakScriptExecResultRequest) (*bizhelper.Paginator, []*schema.ExecResult, error)
- func QueryExportYakScript(db *gorm.DB, params *ypb.ExportLocalYakScriptRequest) *gorm.DB
- func QueryExtractedData(db *gorm.DB, req *ypb.QueryMITMRuleExtractedDataRequest) (*bizhelper.Paginator, []*schema.ExtractedData, error)
- func QueryFirst50WebFuzzerTask(db *gorm.DB) []*ypb.HistoryHTTPFuzzerTask
- func QueryFuzzerHistoryTasks(db *gorm.DB, req *ypb.QueryHistoryHTTPFuzzerTaskExParams) (*bizhelper.Paginator, []*schema.WebFuzzerTask, error)
- func QueryHTTPFlow(db *gorm.DB, params *ypb.QueryHTTPFlowRequest) (paging *bizhelper.Paginator, httpflows []*schema.HTTPFlow, err error)
- func QueryHost(db *gorm.DB, params *ypb.QueryHostsRequest) (*bizhelper.Paginator, []*schema.Host, error)
- func QueryHybridScan(db *gorm.DB, query *ypb.QueryHybridScanTaskRequest) (*bizhelper.Paginator, []*schema.HybridScanTask, error)
- func QueryNaslScriptByName(db *gorm.DB, name string) (*schema.NaslScript, error)
- func QueryNaslScriptByOID(db *gorm.DB, oid string) (*schema.NaslScript, error)
- func QueryNaslScriptByYakScriptRequest(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*schema.NaslScript, error)
- func QueryNewRisk(db *gorm.DB, req *ypb.QueryNewRiskRequest, newRisk bool, isRead bool) (*bizhelper.Paginator, []*schema.Risk, error)
- func QueryPayload(db *gorm.DB, folder, group, keyword string, paging *Paging) (*bizhelper.Paginator, []*schema.Payload, error)
- func QueryPayloadWithCallBack(db *gorm.DB, p *schema.Payload, ...) error
- func QueryPayloadWithoutPaging(db *gorm.DB, folder, group, keyword string) ([]*schema.Payload, error)
- func QueryPorts(db *gorm.DB, params *ypb.QueryPortsRequest) (*bizhelper.Paginator, []*schema.Port, error)
- func QueryProgress(db *gorm.DB, paging *ypb.Paging, filter *ypb.UnfinishedTaskFilter) (*bizhelper.Paginator, []*schema.Progress, error)
- func QueryProject(db *gorm.DB, params *ypb.GetProjectsRequest) (*bizhelper.Paginator, []*schema.Project, error)
- func QueryProjectTotal(db *gorm.DB, req *ypb.GetProjectsRequest) (*bizhelper.Paginator, error)
- func QueryReportRecord(db *gorm.DB, params *ypb.QueryReportsRequest) (*bizhelper.Paginator, []*schema.ReportRecord, error)
- func QueryRisks(db *gorm.DB, params *ypb.QueryRisksRequest) (*bizhelper.Paginator, []*schema.Risk, error)
- func QueryRootNaslScriptByYakScriptRequest(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*schema.NaslScript, error)
- func QueryScreenRecorder(db *gorm.DB, req *ypb.QueryScreenRecorderRequest) (*bizhelper.Paginator, []*schema.ScreenRecorder, error)
- func QueryTrafficPacket(db *gorm.DB, request *ypb.QueryTrafficPacketRequest) (*bizhelper.Paginator, []*schema.TrafficPacket, error)
- func QueryTrafficSession(db *gorm.DB, request *ypb.QueryTrafficSessionRequest) (*bizhelper.Paginator, []*schema.TrafficSession, error)
- func QueryTrafficSessionByUUID(db *gorm.DB, uuid string) (*schema.TrafficSession, error)
- func QueryTrafficTCPReassembled(db *gorm.DB, request *ypb.QueryTrafficTCPReassembledRequest) (*bizhelper.Paginator, []*schema.TrafficTCPReassembledFrame, error)
- func QueryWebFuzzerLabel(db *gorm.DB) ([]*schema.WebFuzzerLabel, error)
- func QueryWebFuzzerLabelCount(db *gorm.DB) int64
- func QueryWebFuzzerResponse(db *gorm.DB, params *ypb.QueryHTTPFuzzerResponseByTaskIdRequest) (*bizhelper.Paginator, []*schema.WebFuzzerResponse, error)
- func QueryWebShells(db *gorm.DB, params *ypb.QueryWebShellsRequest) (*bizhelper.Paginator, []*schema.WebShell, error)
- func QueryWebsocketFlowByWebsocketHash(db *gorm.DB, hash string, page int, limit int) (*bizhelper.Paginator, []*schema.WebsocketFlow, error)
- func QueryWebsocketFlowsByHTTPFlowHash(db *gorm.DB, req *ypb.DeleteHTTPFlowRequest) *gorm.DB
- func QueryYakScript(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*schema.YakScript, error)
- func QueryYakScriptByIsCore(db *gorm.DB, isCore bool) []*schema.YakScript
- func QueryYakScriptByNames(db *gorm.DB, names ...string) []*schema.YakScript
- func QuickSearchHTTPFlowCount(token string) int
- func QuickSearchMITMHTTPFlowCount(token string) int
- func ReadPayloadFileLineWithCallBack(fileName string, handler func(string, int64) error) error
- func ReadQuotedLinesWithCallBack(data string, handler func(string) error) error
- func RefreshProcessEnv(db *gorm.DB)
- func RegisterBeforeRiskSave(f func(*schema.Risk))
- func RegisterLowHTTPSaveCallback()
- func RegisterPostInitDatabaseFunction(f func() error)
- func RegisterServerPushCallback(id string, stream ypb.Yak_DuplexConnectionServer)
- func RemoveTemporaryYakScriptAll(db *gorm.DB, suffix string)
- func RenamePayloadFolder(db *gorm.DB, folder, newFolder string) error
- func RenamePayloadGroup(db *gorm.DB, oldGroup, newGroup string) error
- func RiskTypeToVerbose(i string) string
- func SaveDomain(db *gorm.DB, domain string, ip string) error
- func SaveExecResult(db *gorm.DB, yakScriptName string, r *ypb.ExecResult) error
- func SaveFromHTTP(db *gorm.DB, isHttps bool, req *http.Request, rsp *http.Response, ...) (*schema.HTTPFlow, error)
- func SaveFromHTTPFromRaw(db *gorm.DB, isHttps bool, req []byte, rsp []byte, source string, url string, ...) (*schema.HTTPFlow, error)
- func SaveFromHTTPWithBodySaved(db *gorm.DB, isHttps bool, req *http.Request, rsp *http.Response, ...) (*schema.HTTPFlow, error)
- func SaveFromServerWebsocketFlow(db *gorm.DB, owner string, index int, data []byte) error
- func SaveHybridScanTask(db *gorm.DB, task *schema.HybridScanTask) error
- func SavePayloadByFilename(db *gorm.DB, group string, fileName string) error
- func SavePayloadGroup(db *gorm.DB, group string, lists []string) error
- func SavePayloadGroupByRaw(db *gorm.DB, group string, data string) error
- func SaveRisk(r *schema.Risk) error
- func SaveToServerWebsocketFlow(db *gorm.DB, owner string, index int, data []byte) error
- func SaveTrafficPacket(db *gorm.DB, packet *schema.TrafficPacket) error
- func SaveTrafficSession(db *gorm.DB, session *schema.TrafficSession) error
- func SaveWebFuzzerResponse(db *gorm.DB, taskId int, hiddenIndex string, rsp *ypb.FuzzerResponse)
- func SaveWebFuzzerTask(db *gorm.DB, req *ypb.FuzzerRequest, total int, ok bool, reason string) (*schema.WebFuzzerTask, error)
- func SearchWebsocketFlow(keyword string) int
- func SelectHTTPFlowFromDB(queryDB *gorm.DB, params *ypb.QueryHTTPFlowRequest) (paging *bizhelper.Paginator, httpflows []*schema.HTTPFlow, err error)
- func Set(key interface{}, value interface{})
- func SetCurrentProject(db *gorm.DB, name string) error
- func SetCurrentProjectById(db *gorm.DB, id int64) error
- func SetGlobalPluginScanLists(whitelist, blacklist []string) func()
- func SetGroupInEnd(db *gorm.DB, group string) error
- func SetIndexToFolder(db *gorm.DB, folder, group string, group_index int64) error
- func SetKey(db *gorm.DB, key interface{}, value interface{}) error
- func SetKeyProcessEnv(db *gorm.DB, key interface{}, processEnv bool)
- func SetKeyWithTTL(db *gorm.DB, key interface{}, value interface{}, seconds int) error
- func SetProjectKey(db *gorm.DB, key interface{}, value interface{}) error
- func SetProjectKeyWithGroup(db *gorm.DB, key interface{}, value interface{}, group string) error
- func SetProjectKeyWithTTL(db *gorm.DB, key interface{}, value interface{}, seconds int) error
- func SignalDate(id string, typeString string, data any)
- func SolutionAndDescriptionByCWE(FromYakScript, RiskTypeVerbose, TitleVerbose string) (description, solution string)
- func TidyGeneralStorage(db *gorm.DB)
- func TrimWhitespaceExceptSpace(r rune) bool
- func UnRegisterServerPushCallback(id string)
- func UpdateGeneralModuleFromByYakScriptName(db *gorm.DB, scriptName string, i bool) error
- func UpdateHTTPFlowTags(db *gorm.DB, i *schema.HTTPFlow) error
- func UpdatePayload(db *gorm.DB, id int, payload *schema.Payload) error
- func UpdatePayloadColumns(db *gorm.DB, id int, m map[string]any) error
- func UpdatePayloadGroup(db *gorm.DB, group, folder string, group_index int64) error
- func UpdateProject(db *gorm.DB, id int64, i schema.Project) error
- func UpdateProjectDatabasePath(db *gorm.DB, id int64, databasePath string) error
- func UpdateWebShellById(db *gorm.DB, id int64, i interface{}) (*schema.WebShell, error)
- func UpdateWebShellStateById(db *gorm.DB, id int64, state bool) (*schema.WebShell, error)
- func UpdateYakitStore(db *gorm.DB, baseUrl string) error
- func UploadRiskToOnline(db *gorm.DB, hash []string) error
- func YakScriptLocalTotal(dir []string) int
- func YakScriptLocalType(dirName string) string
- func YieldAliveHostRuntimeId(db *gorm.DB, ctx context.Context, runtimeId string) chan *schema.AliveHost
- func YieldDomains(db *gorm.DB, ctx context.Context) chan *schema.Domain
- func YieldGeneralStorages(db *gorm.DB, ctx context.Context) chan *schema.GeneralStorage
- func YieldHTTPFlows(db *gorm.DB, ctx context.Context) chan *schema.HTTPFlow
- func YieldHTTPUrl(db *gorm.DB, ctx context.Context) chan *HTTPFlowUrl
- func YieldHosts(db *gorm.DB, ctx context.Context) chan *schema.Host
- func YieldPayloads(db *gorm.DB, ctx context.Context) chan *schema.Payload
- func YieldPorts(db *gorm.DB, ctx context.Context) chan *schema.Port
- func YieldProject(db *gorm.DB, ctx context.Context) chan *schema.Project
- func YieldRisks(db *gorm.DB, ctx context.Context) chan *schema.Risk
- func YieldRisksByCreateAt(db *gorm.DB, ctx context.Context, timestamp int64) chan *schema.Risk
- func YieldRisksByRuntimeId(db *gorm.DB, ctx context.Context, runtimeId string) chan *schema.Risk
- func YieldRisksByTarget(db *gorm.DB, ctx context.Context, target string) chan *schema.Risk
- func YieldSimplePorts(db *gorm.DB, ctx context.Context) chan *SimplePort
- func YieldWebFuzzerResponseByTaskIDs(db *gorm.DB, ctx context.Context, taskIDs []uint, oks ...bool) chan *schema.WebFuzzerResponse
- func YieldWebFuzzerResponses(db *gorm.DB, ctx context.Context, id int) chan *schema.WebFuzzerResponse
- func YieldYakScripts(db *gorm.DB, ctx context.Context) chan *schema.YakScript
- type AliveHostParamsOpt
- type CreateHTTPFlowConfig
- type CreateHTTPFlowOptions
- func CreateHTTPFlowWithFixResponseRaw(fixRspRaw []byte) CreateHTTPFlowOptions
- func CreateHTTPFlowWithHTTPS(isHttps bool) CreateHTTPFlowOptions
- func CreateHTTPFlowWithRemoteAddr(remoteAddr string) CreateHTTPFlowOptions
- func CreateHTTPFlowWithRequestIns(reqIns *http.Request) CreateHTTPFlowOptions
- func CreateHTTPFlowWithRequestRaw(reqRaw []byte) CreateHTTPFlowOptions
- func CreateHTTPFlowWithResponseRaw(rspRaw []byte) CreateHTTPFlowOptions
- func CreateHTTPFlowWithSource(source string) CreateHTTPFlowOptions
- func CreateHTTPFlowWithURL(url string) CreateHTTPFlowOptions
- type DuplexConnectionHandler
- type DuplexConnectionServer
- type EnterpriseDetails
- type HTTPFlowUrl
- type MatchInfo
- type MatchResult
- type ModuleType
- type PacketInfo
- type Paging
- type PluginScanFilter
- type PortsTypeGroup
- type RiskParamsOpt
- func WithRiskParam_CVE(s string) RiskParamsOpt
- func WithRiskParam_Description(i string) RiskParamsOpt
- func WithRiskParam_Details(i interface{}) RiskParamsOpt
- func WithRiskParam_FromScript(i string) RiskParamsOpt
- func WithRiskParam_Ignore(i bool) RiskParamsOpt
- func WithRiskParam_Parameter(i string) RiskParamsOpt
- func WithRiskParam_Payload(i string) RiskParamsOpt
- func WithRiskParam_Potential(i bool) RiskParamsOpt
- func WithRiskParam_Request(i interface{}) RiskParamsOpt
- func WithRiskParam_Response(i interface{}) RiskParamsOpt
- func WithRiskParam_RiskType(i string) RiskParamsOpt
- func WithRiskParam_RiskVerbose(i string) RiskParamsOpt
- func WithRiskParam_RuntimeId(i string) RiskParamsOpt
- func WithRiskParam_Severity(i string) RiskParamsOpt
- func WithRiskParam_Solution(i string) RiskParamsOpt
- func WithRiskParam_Title(i string) RiskParamsOpt
- func WithRiskParam_TitleVerbose(i string) RiskParamsOpt
- func WithRiskParam_Token(i string) RiskParamsOpt
- func WithRiskParam_YakitPluginName(i string) RiskParamsOpt
- type SimplePort
- type StoreMeta
- type TagAndStatusCode
- type TagAndTypeValue
- func GroupCount(db *gorm.DB) (req []*TagAndTypeValue, err error)
- func QueryGroupCount(db *gorm.DB, excludeType []string) (req []*TagAndTypeValue, err error)
- func YakScriptTags(db *gorm.DB, where string, havingWhere string) (req []*TagAndTypeValue, err error)
- func YakScriptType(db *gorm.DB) (req []*TagAndTypeValue, err error)
- type TrafficStorageManager
- func (m *TrafficStorageManager) CloseTCPFlow(flow *pcaputil.TrafficFlow, force bool) error
- func (m *TrafficStorageManager) CreateHTTPFlow(flow *pcaputil.TrafficFlow, req *http.Request, rsp *http.Response) error
- func (m *TrafficStorageManager) CreateTCPReassembledFlow(flow *pcaputil.TrafficFlow) error
- func (m *TrafficStorageManager) FetchSession(hash string, packet gopacket.Packet, tpacket *schema.TrafficPacket, ...) (*schema.TrafficSession, error)
- func (m *TrafficStorageManager) SaveRawPacket(packet gopacket.Packet) error
- func (m *TrafficStorageManager) SaveTCPReassembledFrame(flow *pcaputil.TrafficFlow, frame *pcaputil.TrafficFrame) error
- type WebsiteNextPart
- type WebsiteTree
- type YakModuleMeta
- type YakModuleParam
Constants ¶
View Source
const ( HTTPFLOW_TAG = "HTTPFLOW_TAG" HTTPFLOW_STATUSCODE = "HTTPFLOW_STATUSCODE" )
View Source
const ( HYBRIDSCAN_EXECUTING = "executing" HYBRIDSCAN_PAUSED = "paused" HYBRIDSCAN_DONE = "done" HYBRIDSCAN_ERROR = "error" )
View Source
const ( BARE_REQUEST_GROUP = "FLOW_ID_TO_BARE_REQUEST" BARE_RESPONSE_GROUP = "FLOW_ID_TO_BARE_RESPONSE" )
View Source
const ( INIT_DATABASE_RECORD_NAME = "[default]" FolderID = 0 ChildFolderID = 0 TypeProject = "project" TypeFile = "file" TEMPORARY_PROJECT_NAME = "[temporary]" MIGRATE_DATABASE_KEY = "__migrate_database__" )
View Source
const MaxSize = 2 << 20 // 2MB
Variables ¶
View Source
var GetProjectById = model.GetProjectById
Project.ToGRPCModel use GetProjectById, so move GetProjectById to schema package
View Source
var GlobalPluginScanFilter = new(PluginScanFilter)
View Source
var ReportExports = map[string]interface{}{ "New": NewReport, }
View Source
var (
RiskTypes = make([]string, 0)
)
View Source
var YakitDuplexConnectionServer = &DuplexConnectionServer{ Handlers: make(map[string]DuplexConnectionHandler), serverHandlerMutex: sync.Mutex{}, }
Functions ¶
func BatchExtractedData ¶ added in v1.2.2
func BatchScreenRecorder ¶ added in v1.2.2
func BatchWebsocketFlows ¶ added in v1.2.2
func BroadcastData ¶ added in v1.3.2
func BuildHTTPFlowQuery ¶ added in v1.2.9
BuildHTTPFlowQuery 构建带有过滤条件的查询
func CallPostInitDatabase ¶
func CallPostInitDatabase() error
func CheckDNSLogByToken ¶
func CheckDNSLogByToken(token string, timeout ...float64) ([]*tpb.DNSLogEvent, error)
func CheckExistGroup ¶ added in v1.3.0
func CheckHTTPLogByToken ¶ added in v1.3.3
func CheckHTTPLogByToken(token string, timeout ...float64) ([]*tpb.HTTPRequestTriggerNotification, error)
func CheckICMPTriggerByLength ¶
func CheckICMPTriggerByLength(i int) (*tpb.ICMPTriggerNotification, error)
func CheckRandomTriggerByToken ¶
func CheckRandomTriggerByToken(t string) (*tpb.RandomPortTriggerEvent, error)
func CheckServerReachable ¶
func ClearCodecFlow ¶ added in v1.3.3
func ConfigureNetWork ¶ added in v1.3.2
func ConfigureNetWork(c *ypb.GlobalNetworkConfig)
ConfigureNetWork configure network: update memory and database
func CopyPayloads ¶ added in v1.2.9
func CountRiskByRuntimeId ¶ added in v1.3.1
func CountYakScriptByWhere ¶ added in v1.3.1
func CreateHTTPFlow ¶ added in v1.3.2
func CreateHTTPFlow(opts ...CreateHTTPFlowOptions) (*schema.HTTPFlow, error)
func CreateHTTPFlowFromHTTPWithNoRspSaved ¶ added in v1.2.4
func CreateOrUpdateAliveHost ¶ added in v1.2.7
func CreateOrUpdateCodecFlow ¶ added in v1.3.3
func CreateOrUpdateDomain ¶
func CreateOrUpdateHTTPFlow ¶
func CreateOrUpdateMenuItem ¶
func CreateOrUpdateNavigation ¶ added in v1.2.3
func CreateOrUpdatePayload ¶
func CreateOrUpdatePluginGroup ¶ added in v1.3.1
func CreateOrUpdateProgress ¶ added in v1.3.3
func CreateOrUpdateProject ¶
func CreateOrUpdateWebFuzzerLabel ¶ added in v1.2.3
func CreateOrUpdateWebShell ¶ added in v1.3.0
func CreateOrUpdateYakScript ¶
func CreateRisk ¶
func CreateRisk(u string, opts ...RiskParamsOpt) *schema.Risk
func CreateTemporaryYakScript ¶ added in v1.2.2
func DeleteExecHistoryAll ¶
func DeleteExecResult ¶
func DeleteHTTPFlow ¶
func DeleteHTTPFlow(db *gorm.DB, req *ypb.DeleteHTTPFlowRequest) error
func DeleteMenuItem ¶
func DeleteMenuItemAll ¶
func DeleteNavigationByWhere ¶ added in v1.2.3
func DeleteNavigationByWhere(db *gorm.DB, req *ypb.GetAllNavigationRequest) error
func DeletePayloadByFolder ¶ added in v1.2.9
func DeletePluginGroupByHash ¶ added in v1.3.1
func DeletePluginGroupByScriptName ¶ added in v1.3.1
func DeletePluginGroupsWithNonEmptyTemporaryId ¶ added in v1.3.2
func DeleteProgress ¶ added in v1.3.3
func DeleteProgressByRuntimeId ¶ added in v1.3.3
func DeleteProjectKeyBareRequestAndResponse ¶ added in v1.2.9
func DeleteRiskByTarget ¶ added in v1.2.3
func DeleteWebFuzzerLabel ¶ added in v1.2.3
func DeleteWebFuzzerTaskAll ¶
func DeleteWebFuzzerTaskByWebFuzzerIndex ¶ added in v1.2.7
func DeleteWebsocketFlowAll ¶
func DeleteYakScript ¶ added in v1.3.1
func DeleteYakScriptAll ¶
func DeleteYakScriptByUserID ¶
func DeleteYakScriptByWhere ¶
func DropExtractedDataTable ¶
func DropWebsocketFlowTable ¶
func ExportHTTPFlow ¶ added in v1.3.0
func ExtractTokenFromUrl ¶
func ExtractedDataFromHTTPFlow ¶ added in v1.2.7
func ExtractedDataFromHTTPFlow(flowHash string, ruleName string, matchResult *MatchResult, data string, regexpStr ...string) *schema.ExtractedData
func FilterByQueryRisks ¶
func FilterDomain ¶
func FilterHTTPFlow ¶
func FilterHTTPFlowByDomain ¶ added in v1.2.9
func FilterHTTPFlowByRuntimeID ¶ added in v1.3.0
func FilterHTTPFlowBySchema ¶ added in v1.2.9
func FilterHTTPFlowPathPrefix ¶ added in v1.2.9
func FilterHybridScan ¶ added in v1.3.3
func FilterNaslScript ¶ added in v1.2.2
FilterNaslScript 过滤nasl脚本,支持关键词搜索,family过滤,排除和指定脚本名
func FilterPort ¶
func FilterProgress ¶ added in v1.3.3
func FilterReportRecord ¶
func FilterRootScriptsWithDbModelType ¶ added in v1.2.2
func FilterRootScriptsWithDbModelType(scripts []*schema.NaslScript) []*schema.NaslScript
func FilterYakScript ¶
func FixRiskType ¶
func GetAllCodecFlow ¶ added in v1.3.3
func GetAllNavigation ¶ added in v1.2.3
func GetAllNavigation(db *gorm.DB, req *ypb.GetAllNavigationRequest) []*schema.NavigationBar
func GetCodecFlowByName ¶ added in v1.3.3
func GetDefaultNetworkConfig ¶ added in v1.3.2
func GetDefaultNetworkConfig() *ypb.GlobalNetworkConfig
func GetExecHistory ¶
func GetExecResult ¶
func GetExtractedData ¶
func GetHTTPFlowByIDOrHash ¶ added in v1.3.1
func GetHybridScanByTaskId ¶ added in v1.2.9
func GetKeyModel ¶
func GetKeyModel(db *gorm.DB, key interface{}) (*schema.GeneralStorage, error)
func GetMarkdownDoc ¶
func GetMarkdownDocByName ¶
func GetMenuItem ¶
func GetNetworkConfig ¶ added in v1.3.2
func GetNetworkConfig() *ypb.GlobalNetworkConfig
func GetNucleiYakScriptByName ¶
GetNucleiYakScriptByName
func GetOneScreenRecorder ¶ added in v1.2.2
func GetOneScreenRecorder(db *gorm.DB, req *ypb.GetOneScreenRecorderRequest) (*schema.ScreenRecorder, error)
func GetPayloadById ¶ added in v1.2.9
func GetPayloadCountInGroup ¶ added in v1.2.9
func GetPayloadFirst ¶ added in v1.3.0
func GetPayloadGroupFileName ¶ added in v1.2.9
func GetPayloadsByFolder ¶ added in v1.2.9
func GetPayloadsByGroup ¶ added in v1.2.9
func GetPluginByGroup ¶ added in v1.3.1
func GetProcessEnvKey ¶
func GetProcessEnvKey(db *gorm.DB) []*schema.GeneralStorage
func GetProgressByRuntimeId ¶ added in v1.3.3
func GetProject ¶
func GetProjectByWhere ¶
func GetProjectDetail ¶
func GetProjectKey ¶ added in v1.2.2
func GetProjectKeyByWhere ¶ added in v1.2.7
func GetProjectKeyModel ¶ added in v1.2.2
func GetProjectKeyModel(db *gorm.DB, key interface{}) (*schema.ProjectGeneralStorage, error)
func GetProjectKeyWithError ¶ added in v1.2.6
func GetReportRecord ¶
func GetReportRecordByHash ¶
func GetRisksByRuntimeId ¶ added in v1.3.1
func GetScreenRecorder ¶
func GetTemporaryProject ¶ added in v1.3.0
func GetWebFuzzerRetryRootID ¶ added in v1.2.8
func GetWebFuzzerTaskById ¶
func GetWebFuzzerTasksIDByRetryRootID ¶ added in v1.2.8
func GetWebsocketFlow ¶
func GetYakScriptByName ¶
func GetYakScriptByOnlineID ¶
func GetYakScriptByUUID ¶
func GetYakScriptIdOrName ¶
func GetYakScriptList ¶
func HaveReverseRisk ¶
func InitialDatabase ¶ added in v1.2.3
func InitialDatabase()
func InitializingProjectDatabase ¶
func InitializingProjectDatabase() error
func InsertHTTPFlow ¶ added in v1.2.3
func IsExitScreenRecorder ¶ added in v1.2.2
func LoadGlobalNetworkConfig ¶ added in v1.3.2
func LoadGlobalNetworkConfig()
LoadGlobalNetworkConfig load config from yakit config in db
func LoadPackage ¶
func LoadYakitFromLocalDir ¶
func LoadYakitResources ¶
func MigrateLegacyDatabase ¶
func MigrateLegacyDatabase() error
func MovePayloads ¶ added in v1.2.9
func NewAliveHost ¶ added in v1.2.7
func NewAliveHost(u string, opts ...AliveHostParamsOpt) (*schema.AliveHost, error)
func NewDNSLogDomain ¶
func NewEmptyNaslScript ¶
func NewEmptyNaslScript() *schema.NaslScript
func NewLocalReverseProtoUrl ¶
func NewLocalReverseProtoUrl(proto string) func(opts ...RiskParamsOpt) string
func NewNaslScript ¶
func NewNaslScript(name, content string) *schema.NaslScript
func NewPayload ¶ added in v1.2.9
/ payload
func NewPublicReverseProtoUrl ¶
func NewPublicReverseProtoUrl(proto string) func(opts ...RiskParamsOpt) string
func NewRandomPortTrigger ¶
func NewRandomPortTrigger(opt ...RiskParamsOpt) (token string, addr string, _ error)
func NewRiskReadRequest ¶
func NewTemporaryYakScript ¶ added in v1.3.2
func NewUnverifiedRisk ¶
func QueryAllMenuItemByWhere ¶
func QueryDomain ¶
func QueryExecHistory ¶
func QueryExecHistory(db *gorm.DB, params *ypb.ExecHistoryRequest) (*bizhelper.Paginator, []*schema.ExecHistory, error)
func QueryExecResult ¶
func QueryExecResult(db *gorm.DB, params *ypb.QueryYakScriptExecResultRequest) (*bizhelper.Paginator, []*schema.ExecResult, error)
func QueryExportYakScript ¶ added in v1.3.0
func QueryExtractedData ¶
func QueryExtractedData(db *gorm.DB, req *ypb.QueryMITMRuleExtractedDataRequest) (*bizhelper.Paginator, []*schema.ExtractedData, error)
func QueryFirst50WebFuzzerTask ¶
func QueryFirst50WebFuzzerTask(db *gorm.DB) []*ypb.HistoryHTTPFuzzerTask
Deprecated
func QueryFuzzerHistoryTasks ¶
func QueryFuzzerHistoryTasks(db *gorm.DB, req *ypb.QueryHistoryHTTPFuzzerTaskExParams) (*bizhelper.Paginator, []*schema.WebFuzzerTask, error)
func QueryHTTPFlow ¶
func QueryHybridScan ¶ added in v1.2.9
func QueryHybridScan(db *gorm.DB, query *ypb.QueryHybridScanTaskRequest) (*bizhelper.Paginator, []*schema.HybridScanTask, error)
func QueryNaslScriptByName ¶ added in v1.2.2
func QueryNaslScriptByOID ¶ added in v1.2.2
func QueryNaslScriptByYakScriptRequest ¶ added in v1.2.2
func QueryNaslScriptByYakScriptRequest(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*schema.NaslScript, error)
func QueryNewRisk ¶
func QueryPayload ¶
func QueryPayloadWithCallBack ¶ added in v1.3.0
func QueryPayloadWithoutPaging ¶ added in v1.3.0
func QueryPorts ¶
func QueryProgress ¶ added in v1.3.3
func QueryProject ¶
func QueryProjectTotal ¶
func QueryReportRecord ¶
func QueryReportRecord(db *gorm.DB, params *ypb.QueryReportsRequest) (*bizhelper.Paginator, []*schema.ReportRecord, error)
func QueryRisks ¶
func QueryRootNaslScriptByYakScriptRequest ¶ added in v1.2.2
func QueryRootNaslScriptByYakScriptRequest(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*schema.NaslScript, error)
func QueryScreenRecorder ¶
func QueryScreenRecorder(db *gorm.DB, req *ypb.QueryScreenRecorderRequest) (*bizhelper.Paginator, []*schema.ScreenRecorder, error)
func QueryTrafficPacket ¶ added in v1.2.8
func QueryTrafficPacket(db *gorm.DB, request *ypb.QueryTrafficPacketRequest) (*bizhelper.Paginator, []*schema.TrafficPacket, error)
func QueryTrafficSession ¶ added in v1.2.8
func QueryTrafficSession(db *gorm.DB, request *ypb.QueryTrafficSessionRequest) (*bizhelper.Paginator, []*schema.TrafficSession, error)
func QueryTrafficSessionByUUID ¶ added in v1.3.0
func QueryTrafficTCPReassembled ¶ added in v1.2.8
func QueryTrafficTCPReassembled(db *gorm.DB, request *ypb.QueryTrafficTCPReassembledRequest) (*bizhelper.Paginator, []*schema.TrafficTCPReassembledFrame, error)
func QueryWebFuzzerLabel ¶ added in v1.2.3
func QueryWebFuzzerLabel(db *gorm.DB) ([]*schema.WebFuzzerLabel, error)
func QueryWebFuzzerLabelCount ¶ added in v1.2.3
func QueryWebFuzzerResponse ¶
func QueryWebFuzzerResponse(db *gorm.DB, params *ypb.QueryHTTPFuzzerResponseByTaskIdRequest) (*bizhelper.Paginator, []*schema.WebFuzzerResponse, error)
func QueryWebShells ¶ added in v1.3.0
func QueryYakScript ¶
func QueryYakScriptByIsCore ¶ added in v1.2.4
func QueryYakScriptByNames ¶
func QuickSearchHTTPFlowCount ¶ added in v1.2.3
func QuickSearchMITMHTTPFlowCount ¶ added in v1.2.3
func ReadPayloadFileLineWithCallBack ¶ added in v1.3.0
func ReadQuotedLinesWithCallBack ¶ added in v1.3.0
func RefreshProcessEnv ¶
RefreshProcessEnv 在数据库初始化的时候执行这个,可以快速更新本进程的环境变量
func RegisterBeforeRiskSave ¶ added in v1.2.6
func RegisterLowHTTPSaveCallback ¶ added in v1.3.3
func RegisterLowHTTPSaveCallback()
func RegisterPostInitDatabaseFunction ¶
func RegisterPostInitDatabaseFunction(f func() error)
func RegisterServerPushCallback ¶ added in v1.3.2
func RegisterServerPushCallback(id string, stream ypb.Yak_DuplexConnectionServer)
func RemoveTemporaryYakScriptAll ¶ added in v1.3.2
func RenamePayloadFolder ¶ added in v1.2.9
func RenamePayloadGroup ¶ added in v1.2.9
func RiskTypeToVerbose ¶
func SaveExecResult ¶
func SaveFromHTTP ¶
func SaveFromHTTPFromRaw ¶
func SaveHybridScanTask ¶ added in v1.2.9
func SaveHybridScanTask(db *gorm.DB, task *schema.HybridScanTask) error
func SavePayloadByFilename ¶
save payload from file
func SavePayloadGroup ¶
save payload from data
func SavePayloadGroupByRaw ¶ added in v1.2.9
save payload from raw-data
func SaveTrafficPacket ¶ added in v1.2.8
func SaveTrafficPacket(db *gorm.DB, packet *schema.TrafficPacket) error
func SaveTrafficSession ¶ added in v1.2.8
func SaveTrafficSession(db *gorm.DB, session *schema.TrafficSession) error
func SaveWebFuzzerResponse ¶
func SaveWebFuzzerTask ¶
func SaveWebFuzzerTask(db *gorm.DB, req *ypb.FuzzerRequest, total int, ok bool, reason string) (*schema.WebFuzzerTask, error)
func SearchWebsocketFlow ¶ added in v1.3.1
func SelectHTTPFlowFromDB ¶ added in v1.3.3
func SetGlobalPluginScanLists ¶ added in v1.3.2
func SetGlobalPluginScanLists(whitelist, blacklist []string) func()
func SetIndexToFolder ¶ added in v1.2.9
func SetKeyProcessEnv ¶
func SetKeyWithTTL ¶
func SetProjectKey ¶ added in v1.2.2
func SetProjectKeyWithGroup ¶ added in v1.2.6
func SetProjectKeyWithTTL ¶ added in v1.2.2
func SignalDate ¶
func SolutionAndDescriptionByCWE ¶ added in v1.2.6
func TidyGeneralStorage ¶
func TrimWhitespaceExceptSpace ¶ added in v1.2.9
trim payload content
func UnRegisterServerPushCallback ¶ added in v1.3.2
func UnRegisterServerPushCallback(id string)
func UpdateHTTPFlowTags ¶ added in v1.2.3
func UpdatePayloadColumns ¶ added in v1.3.0
func UpdatePayloadGroup ¶ added in v1.2.9
func UpdateProjectDatabasePath ¶ added in v1.3.1
func UpdateWebShellById ¶ added in v1.3.0
func UpdateWebShellStateById ¶ added in v1.3.0
func YakScriptLocalTotal ¶ added in v1.3.0
func YakScriptLocalType ¶ added in v1.3.0
func YieldAliveHostRuntimeId ¶ added in v1.2.7
func YieldGeneralStorages ¶
func YieldHTTPUrl ¶
func YieldHTTPUrl(db *gorm.DB, ctx context.Context) chan *HTTPFlowUrl
func YieldRisksByCreateAt ¶
func YieldRisksByRuntimeId ¶
func YieldRisksByTarget ¶
func YieldSimplePorts ¶
func YieldSimplePorts(db *gorm.DB, ctx context.Context) chan *SimplePort
func YieldWebFuzzerResponseByTaskIDs ¶ added in v1.2.8
func YieldWebFuzzerResponses ¶
Types ¶
type AliveHostParamsOpt ¶ added in v1.2.7
type CreateHTTPFlowConfig ¶ added in v1.3.2
type CreateHTTPFlowConfig struct {
// contains filtered or unexported fields
}
type CreateHTTPFlowOptions ¶ added in v1.3.2
type CreateHTTPFlowOptions func(c *CreateHTTPFlowConfig)
func CreateHTTPFlowWithFixResponseRaw ¶ added in v1.3.2
func CreateHTTPFlowWithFixResponseRaw(fixRspRaw []byte) CreateHTTPFlowOptions
如果传入了fixRspRaw,则不会再修复
func CreateHTTPFlowWithHTTPS ¶ added in v1.3.2
func CreateHTTPFlowWithHTTPS(isHttps bool) CreateHTTPFlowOptions
func CreateHTTPFlowWithRemoteAddr ¶ added in v1.3.2
func CreateHTTPFlowWithRemoteAddr(remoteAddr string) CreateHTTPFlowOptions
func CreateHTTPFlowWithRequestIns ¶ added in v1.3.2
func CreateHTTPFlowWithRequestIns(reqIns *http.Request) CreateHTTPFlowOptions
如果传入了RequestIns,则优先使用这个作为NewFuzzRequest的参数
func CreateHTTPFlowWithRequestRaw ¶ added in v1.3.2
func CreateHTTPFlowWithRequestRaw(reqRaw []byte) CreateHTTPFlowOptions
func CreateHTTPFlowWithResponseRaw ¶ added in v1.3.2
func CreateHTTPFlowWithResponseRaw(rspRaw []byte) CreateHTTPFlowOptions
func CreateHTTPFlowWithSource ¶ added in v1.3.2
func CreateHTTPFlowWithSource(source string) CreateHTTPFlowOptions
func CreateHTTPFlowWithURL ¶ added in v1.3.2
func CreateHTTPFlowWithURL(url string) CreateHTTPFlowOptions
type DuplexConnectionHandler ¶
type DuplexConnectionHandler func(context.Context, *ypb.DuplexConnectionRequest) error
type DuplexConnectionServer ¶
type DuplexConnectionServer struct { Handlers map[string]DuplexConnectionHandler // contains filtered or unexported fields }
func (*DuplexConnectionServer) RegisterHandler ¶
func (s *DuplexConnectionServer) RegisterHandler(handlerName string, handler DuplexConnectionHandler)
func (*DuplexConnectionServer) Server ¶
func (s *DuplexConnectionServer) Server(ctx context.Context, stream ypb.Yak_DuplexConnectionServer)
func (*DuplexConnectionServer) UnRegisterHandler ¶
func (s *DuplexConnectionServer) UnRegisterHandler(handlerName string)
type EnterpriseDetails ¶
type EnterpriseDetails struct { gorm.Model // 社会信用识别码 SocialCreditCode string `json:"social_credit_code" gorm:"unique_index"` TaxCode string `json:"tax_code"` // 纳税人识别码 OrgCode string `json:"org_code"` // 企业机构代码 BizCode string `json:"biz_code"` // 工商注册码 ControllerSocialCreditCode string `json:"controller_social_credit_code"` ControllerHoldingPercent string `json:"controller_holding_percent"` // SearchKeyword string `json:"keyword"` DomainKeyword string `json:"domain_keyword"` ExtraJSON string `json:"extra_json"` }
type HTTPFlowUrl ¶
type HTTPFlowUrl struct {
Url string `json:"url"`
}
type MatchResult ¶ added in v1.3.3
type ModuleType ¶
type PacketInfo ¶ added in v1.3.3
type PluginScanFilter ¶ added in v1.3.2
type PortsTypeGroup ¶ added in v1.2.2
type PortsTypeGroup struct { Nginx int32 Apache int32 IIS int32 Litespeed int32 Tomcat int32 ApacheTrafficServer int32 OracleHTTPServer int32 Openresty int32 Jetty int32 Caddy int32 Gunicorn int32 Cowboy int32 Lighttpd int32 Resin int32 Zeus int32 Cherrypy int32 Tengine int32 Glassfish int32 PhusionPassenger int32 Tornadoserver int32 Hiawatha int32 OracleApplicationServer int32 AbyssWebServer int32 Boa int32 Xitami int32 Simplehttp int32 Cherokee int32 MonkeyHTTPServer int32 NodeJS int32 Websphere int32 Zope int32 Mongoose int32 Macos int32 Kestrel int32 Aolserver int32 Dnsmasq int32 Ruby int32 Webrick int32 WeblogicServer int32 Jboss int32 SqlServer int32 Mysql int32 Mongodb int32 Redis int32 Elasticsearch int32 Postgresql int32 DB2 int32 Hbase int32 Memcached int32 Splunkd int32 }
func PortsServiceTypeGroup ¶ added in v1.2.2
func PortsServiceTypeGroup() ([]*PortsTypeGroup, error)
type RiskParamsOpt ¶
func WithRiskParam_CVE ¶
func WithRiskParam_CVE(s string) RiskParamsOpt
func WithRiskParam_Description ¶
func WithRiskParam_Description(i string) RiskParamsOpt
func WithRiskParam_Details ¶
func WithRiskParam_Details(i interface{}) RiskParamsOpt
func WithRiskParam_FromScript ¶
func WithRiskParam_FromScript(i string) RiskParamsOpt
func WithRiskParam_Ignore ¶ added in v1.2.6
func WithRiskParam_Ignore(i bool) RiskParamsOpt
func WithRiskParam_Parameter ¶
func WithRiskParam_Parameter(i string) RiskParamsOpt
func WithRiskParam_Payload ¶
func WithRiskParam_Payload(i string) RiskParamsOpt
func WithRiskParam_Potential ¶
func WithRiskParam_Potential(i bool) RiskParamsOpt
func WithRiskParam_Request ¶
func WithRiskParam_Request(i interface{}) RiskParamsOpt
func WithRiskParam_Response ¶
func WithRiskParam_Response(i interface{}) RiskParamsOpt
func WithRiskParam_RiskType ¶
func WithRiskParam_RiskType(i string) RiskParamsOpt
func WithRiskParam_RiskVerbose ¶
func WithRiskParam_RiskVerbose(i string) RiskParamsOpt
func WithRiskParam_RuntimeId ¶
func WithRiskParam_RuntimeId(i string) RiskParamsOpt
func WithRiskParam_Severity ¶
func WithRiskParam_Severity(i string) RiskParamsOpt
func WithRiskParam_Solution ¶
func WithRiskParam_Solution(i string) RiskParamsOpt
func WithRiskParam_Title ¶
func WithRiskParam_Title(i string) RiskParamsOpt
func WithRiskParam_TitleVerbose ¶
func WithRiskParam_TitleVerbose(i string) RiskParamsOpt
func WithRiskParam_Token ¶
func WithRiskParam_Token(i string) RiskParamsOpt
func WithRiskParam_YakitPluginName ¶
func WithRiskParam_YakitPluginName(i string) RiskParamsOpt
type SimplePort ¶
type StoreMeta ¶
type StoreMeta struct {
Types []ModuleType `json:"types"`
}
type TagAndStatusCode ¶
func HTTPFlowTags ¶
func HTTPFlowTags(refreshRequest bool) ([]*TagAndStatusCode, error)
type TagAndTypeValue ¶
func GroupCount ¶ added in v1.3.1
func GroupCount(db *gorm.DB) (req []*TagAndTypeValue, err error)
func QueryGroupCount ¶ added in v1.3.3
func QueryGroupCount(db *gorm.DB, excludeType []string) (req []*TagAndTypeValue, err error)
func YakScriptTags ¶
func YakScriptType ¶
func YakScriptType(db *gorm.DB) (req []*TagAndTypeValue, err error)
type TrafficStorageManager ¶ added in v1.2.8
func NewTrafficStorageManager ¶ added in v1.2.8
func NewTrafficStorageManager(db *gorm.DB) *TrafficStorageManager
func (*TrafficStorageManager) CloseTCPFlow ¶ added in v1.2.8
func (m *TrafficStorageManager) CloseTCPFlow(flow *pcaputil.TrafficFlow, force bool) error
func (*TrafficStorageManager) CreateHTTPFlow ¶ added in v1.2.8
func (m *TrafficStorageManager) CreateHTTPFlow(flow *pcaputil.TrafficFlow, req *http.Request, rsp *http.Response) error
func (*TrafficStorageManager) CreateTCPReassembledFlow ¶ added in v1.2.8
func (m *TrafficStorageManager) CreateTCPReassembledFlow(flow *pcaputil.TrafficFlow) error
func (*TrafficStorageManager) FetchSession ¶ added in v1.2.8
func (m *TrafficStorageManager) FetchSession(hash string, packet gopacket.Packet, tpacket *schema.TrafficPacket, typeStr string, noCreate bool) (*schema.TrafficSession, error)
func (*TrafficStorageManager) SaveRawPacket ¶ added in v1.2.8
func (m *TrafficStorageManager) SaveRawPacket(packet gopacket.Packet) error
func (*TrafficStorageManager) SaveTCPReassembledFrame ¶ added in v1.2.8
func (m *TrafficStorageManager) SaveTCPReassembledFrame(flow *pcaputil.TrafficFlow, frame *pcaputil.TrafficFrame) error
type WebsiteNextPart ¶ added in v1.2.9
type WebsiteNextPart struct { Schema string NextPart string HaveChildren bool Count int IsQuery bool RawQueryKey string RawNextPart string IsFile bool }
func GetHTTPFlowDomainsByDomainSuffix ¶ added in v1.2.9
func GetHTTPFlowDomainsByDomainSuffix(db *gorm.DB, domainSuffix string) []*WebsiteNextPart
func GetHTTPFlowNextPartPathByPathPrefix ¶ added in v1.2.9
func GetHTTPFlowNextPartPathByPathPrefix(db *gorm.DB, originPathPrefix string) []*WebsiteNextPart
type WebsiteTree ¶ added in v1.2.9
type WebsiteTree struct { Path string NextParts []*WebsiteNextPart HaveChildren bool }
type YakModuleMeta ¶
type YakModuleMeta struct { ModuleName string `json:"name" yaml:"name"` Tags []string `json:"tags" yaml:"tags"` Help string `json:"help" yaml:"help"` Author string `json:"author" yaml:"author"` ModuleFile string `json:"module_file" yaml:"module_file"` Params []YakModuleParam `json:"params" yaml:"params"` Document string `json:"document" yaml:"document"` GeneralModuleVerbose string `json:"general_module_verbose" yaml:"general_module_verbose"` GeneralModuleKey string `json:"general_module_key" yaml:"general_module_key"` IsGeneralModule bool `json:"is_general_module" yaml:"is_general_module"` EnablePluginSelector bool `json:"enable_plugin_selector" yaml:"enable_plugin_selector"` PluginSelectorTypes string `json:"plugin_selector_types" yaml:"plugin_selector_types"` }
type YakModuleParam ¶
type YakModuleParam struct { Name string `json:"name" yaml:"name"` Verbose string `json:"verbose" yaml:"verbose"` Description string `json:"description" yaml:"description"` Type string `json:"type" yaml:"type"` DefaultValue string `json:"default_value" yaml:"default_value"` Required bool `json:"required" yaml:"required"` Group string `json:"group" yaml:"group"` ExtraSetting string `json:"extra_setting" yaml:"extra_setting"` }
Source Files ¶
- aliveHost.go
- aliveHost_exports.go
- base.go
- codecflow.go
- doc.go
- domain.go
- duplex_conn.go
- duplex_conn_server.go
- enterprice_chain.go
- exec_history.go
- exportresource.go
- extracted_data.go
- fuzzer_label.go
- fuzzer_task.go
- host.go
- httpflow.go
- httpflow_tree_helper.go
- hybridscan.go
- kv.go
- menu.go
- nasl.go
- navigation.go
- payload.go
- plugin_group.go
- plugin_scan_filter.go
- port.go
- progress.go
- project_kv.go
- projects.go
- recorder.go
- report.go
- risk.go
- risk_exports.go
- rssfeed.go
- store_schema.go
- traffic.go
- traffic_storage.go
- webshell.go
- websocketflow.go
- yak_script.go
- yak_script_params.go
- yak_script_result.go
Click to show internal directories.
Click to hide internal directories.