Documentation ¶
Index ¶
- Constants
- Variables
- func BatchExtractedData(db *gorm.DB, ctx context.Context) chan *ExtractedData
- func BatchScreenRecorder(db *gorm.DB, ctx context.Context) chan *ScreenRecorder
- func BatchWebsocketFlows(db *gorm.DB, ctx context.Context) chan *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 CheckICMPTriggerByLength(i int) (*tpb.ICMPTriggerNotification, error)
- func CheckRandomTriggerByToken(t string) (*tpb.RandomPortTriggerEvent, error)
- func ConfigureNetWork(c *ypb.GlobalNetworkConfig)
- func CopyPayloads(db *gorm.DB, payloads []*Payload, group, folder string) error
- func CountRiskByRuntimeId(db *gorm.DB, runtimeId string) (uint32, error)
- func CountYakScriptByWhere(db *gorm.DB, isGroup bool) (total int64, err error)
- func CreateOrUpdateAliveHost(db *gorm.DB, hash string, i interface{}) 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 *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 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 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 CreateTemporaryYakScript(t string, code string, suffix ...string) (string, error)
- func DelKey(db *gorm.DB, key interface{})
- 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 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 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 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 ExportYakScript(db *gorm.DB, fileName string) error
- func ExtractTokenFromUrl(tokenUrl string) string
- 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 FilterNaslScript(db *gorm.DB, params *ypb.QueryYakScriptRequest) *gorm.DB
- func FilterPort(db *gorm.DB, params *ypb.QueryPortsRequest) *gorm.DB
- func FilterReportRecord(db *gorm.DB, params *ypb.QueryReportsRequest) *gorm.DB
- func FilterYakScript(db *gorm.DB, params *ypb.QueryYakScriptRequest) *gorm.DB
- func FixRiskType(db *gorm.DB)
- func FuzzParamsToGRPCFuzzableParam(r *mutate.FuzzHTTPRequestParam, isHttps bool) *ypb.FuzzableParam
- func Get(key interface{}) string
- func GetDefaultNetworkConfig() *ypb.GlobalNetworkConfig
- func GetDefaultScriptFileNameByType(t string) (string, error)
- func GetKey(db *gorm.DB, key interface{}) string
- func GetNetworkConfig() *ypb.GlobalNetworkConfig
- func GetPayloadCountInGroup(db *gorm.DB, group string) int64
- func GetPayloadGroupFileName(db *gorm.DB, group string) (string, error)
- func GetProjectKey(db *gorm.DB, key interface{}) string
- func GetProjectKeyWithError(db *gorm.DB, key interface{}) (string, error)
- func GetWebFuzzerRetryRootID(db *gorm.DB, id uint) (uint, error)
- func GetWebFuzzerTasksIDByRetryRootID(db *gorm.DB, root_id uint) ([]uint, error)
- func GetWebShell(db *gorm.DB, id int64) (*ypb.WebShell, 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 InitializeDefaultDatabaseSchema()
- func InitializingProjectDatabase() error
- func InsertHTTPFlow(db *gorm.DB, i *HTTPFlow) (fErr error)
- func LoadGlobalNetworkConfig()
- func LoadPackage(typeStr string, basePath string) (*YakScript, *MarkdownDoc, error)
- func LoadYakitFromLocalDir(f string) error
- func LoadYakitResources(dirName string) ([]*YakScript, []*MarkdownDoc, error)
- func LoadYakitThirdpartySourceScripts(ctx context.Context, ghUrl string, proxy ...string) error
- func MigrateLegacyDatabase() error
- func MovePayloads(db *gorm.DB, payloads []*Payload, group, folder string) error
- func NewDNSLogDomain() (domain string, token string, _ error)
- func NewDNSLogDomainWithContext(ctx context.Context) (domain string, token string, _ error)
- func NewLocalReverseProtoUrl(proto string) func(opts ...RiskParamsOpt) string
- func NewPublicReverseProtoUrl(proto string) func(opts ...RiskParamsOpt) string
- func NewRandomPortTrigger(opt ...RiskParamsOpt) (token string, addr string, _ error)
- func NewRiskReadRequest(db *gorm.DB, req *ypb.NewRiskReadRequest, Ids []int64) error
- func PayloadGroups(db *gorm.DB, search ...string) []string
- func QueryExportYakScript(db *gorm.DB, params *ypb.ExportLocalYakScriptRequest) *gorm.DB
- func QueryFirst50WebFuzzerTask(db *gorm.DB) []*ypb.HistoryHTTPFuzzerTask
- func QueryPayloadWithCallBack(db *gorm.DB, p *Payload, ...) error
- func QueryProjectTotal(db *gorm.DB, req *ypb.GetProjectsRequest) (*bizhelper.Paginator, error)
- func QueryWebFuzzerLabelCount(db *gorm.DB) int64
- func QueryWebsocketFlowsByHTTPFlowHash(db *gorm.DB, req *ypb.DeleteHTTPFlowRequest) *gorm.DB
- 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(*Risk))
- 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 SaveFromServerWebsocketFlow(db *gorm.DB, owner string, index int, data []byte) error
- func SaveHybridScanTask(db *gorm.DB, task *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 *Risk) error
- func SaveToServerWebsocketFlow(db *gorm.DB, owner string, index int, data []byte) error
- func SaveTrafficPacket(db *gorm.DB, packet *TrafficPacket) error
- func SaveTrafficSession(db *gorm.DB, session *TrafficSession) error
- func SaveWebFuzzerResponse(db *gorm.DB, taskId int, rsp *ypb.FuzzerResponse)
- func SearchWebsocketFlow(keyword string) int
- 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 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 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 *HTTPFlow) error
- func UpdatePayload(db *gorm.DB, id int, payload *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 Project) error
- func UpdateProjectDatabasePath(db *gorm.DB, id int64, databasePath string) error
- func UpdateYakitStore(db *gorm.DB, baseUrl string) error
- func UploadRiskToOnline(db *gorm.DB, hash []string) error
- func UserDataAndPluginDatabaseScope(db *gorm.DB) *gorm.DB
- func YakScriptLocalTotal(dir []string) int
- func YakScriptLocalType(dirName string) string
- func YieldAliveHostRuntimeId(db *gorm.DB, ctx context.Context, runtimeId string) chan *AliveHost
- func YieldDomains(db *gorm.DB, ctx context.Context) chan *Domain
- func YieldGeneralStorages(db *gorm.DB, ctx context.Context) chan *GeneralStorage
- func YieldHTTPFlows(db *gorm.DB, ctx context.Context) chan *HTTPFlow
- func YieldHTTPUrl(db *gorm.DB, ctx context.Context) chan *HTTPFlowUrl
- func YieldHosts(db *gorm.DB, ctx context.Context) chan *Host
- func YieldPayloads(db *gorm.DB, ctx context.Context) chan *Payload
- func YieldPorts(db *gorm.DB, ctx context.Context) chan *Port
- func YieldProject(db *gorm.DB, ctx context.Context) chan *Project
- func YieldRisks(db *gorm.DB, ctx context.Context) chan *Risk
- func YieldRisksByCreateAt(db *gorm.DB, ctx context.Context, timestamp int64) chan *Risk
- func YieldRisksByRuntimeId(db *gorm.DB, ctx context.Context, runtimeId string) chan *Risk
- func YieldRisksByTarget(db *gorm.DB, ctx context.Context, target string) chan *Risk
- func YieldSimplePorts(db *gorm.DB, ctx context.Context) chan *SimplePort
- func YieldWebFuzzerResponseByTaskIDs(db *gorm.DB, ctx context.Context, taskIDs []uint, oks ...bool) chan *WebFuzzerResponse
- func YieldWebFuzzerResponses(db *gorm.DB, ctx context.Context, id int) chan *WebFuzzerResponse
- func YieldYakScripts(db *gorm.DB, ctx context.Context) chan *YakScript
- type AliveHost
- type AliveHostParamsOpt
- type BackProject
- type Briefing
- 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 Domain
- type EnterpriseDetails
- type ExecHistory
- type ExecResult
- type ExtractedData
- func ExtractedDataFromHTTPFlow(flowHash string, ruleName string, data string, regexpStr ...string) *ExtractedData
- func GetExtractedData(db *gorm.DB, id int64) (*ExtractedData, error)
- func QueryExtractedData(db *gorm.DB, req *ypb.QueryMITMRuleExtractedDataRequest) (*bizhelper.Paginator, []*ExtractedData, error)
- type GeneralStorage
- type HTTPFlow
- func CreateHTTPFlow(opts ...CreateHTTPFlowOptions) (*HTTPFlow, error)
- func CreateHTTPFlowFromHTTPWithBodySaved(isHttps bool, req *http.Request, rsp *http.Response, source string, url string, ...) (*HTTPFlow, error)
- func CreateHTTPFlowFromHTTPWithBodySavedFromRaw(isHttps bool, reqRaw []byte, rspRaw []byte, source string, url string, ...) (*HTTPFlow, error)
- func CreateHTTPFlowFromHTTPWithNoRspSaved(isHttps bool, req *http.Request, source string, url string, remoteAddr string, ...) (*HTTPFlow, error)
- func ExportHTTPFlow(db *gorm.DB, params *ypb.ExportHTTPFlowsRequest) (paging *bizhelper.Paginator, ret []*HTTPFlow, err error)
- func FuzzerResponseToHTTPFlow(db *gorm.DB, rsp *ypb.FuzzerResponse) (*HTTPFlow, error)
- func GetHTTPFlow(db *gorm.DB, id int64) (*HTTPFlow, error)
- func GetHTTPFlowByHash(db *gorm.DB, hash string) (*HTTPFlow, error)
- func GetHTTPFlowByIDOrHash(db *gorm.DB, id int64, hash string) (*HTTPFlow, error)
- func QueryHTTPFlow(db *gorm.DB, params *ypb.QueryHTTPFlowRequest) (paging *bizhelper.Paginator, ret []*HTTPFlow, err error)
- func SaveFromHTTP(db *gorm.DB, isHttps bool, req *http.Request, rsp *http.Response, ...) (*HTTPFlow, error)
- func SaveFromHTTPFromRaw(db *gorm.DB, isHttps bool, req []byte, rsp []byte, source string, url string, ...) (*HTTPFlow, error)
- func SaveFromHTTPWithBodySaved(db *gorm.DB, isHttps bool, req *http.Request, rsp *http.Response, ...) (*HTTPFlow, error)
- func (f *HTTPFlow) AddTag(appendTags ...string)
- func (f *HTTPFlow) AddTagToFirst(appendTags ...string)
- func (f *HTTPFlow) AfterCreate(tx *gorm.DB) (err error)
- func (f *HTTPFlow) AfterDelete(tx *gorm.DB) (err error)
- func (f *HTTPFlow) AfterSave(tx *gorm.DB) (err error)
- func (f *HTTPFlow) AfterUpdate(tx *gorm.DB) (err error)
- func (f *HTTPFlow) BeforeSave() error
- func (f *HTTPFlow) Blue()
- func (f *HTTPFlow) CalcCacheHash(full bool) string
- func (f *HTTPFlow) CalcHash() string
- func (f *HTTPFlow) ColorSharp(rgbHex string)
- func (f *HTTPFlow) Cyan()
- func (f *HTTPFlow) FixHTTPRequest(req *http.Request)
- func (f *HTTPFlow) Green()
- func (f *HTTPFlow) Grey()
- func (f *HTTPFlow) Orange()
- func (f *HTTPFlow) Purple()
- func (f *HTTPFlow) Red()
- func (f *HTTPFlow) RemoveColor()
- func (f *HTTPFlow) SetCacheGRPCModel(full bool, m *ypb.HTTPFlow)
- func (f *HTTPFlow) ToGRPCModel(full bool) (*ypb.HTTPFlow, error)
- func (f *HTTPFlow) ToGRPCModelFull() (*ypb.HTTPFlow, error)
- func (f *HTTPFlow) Yellow()
- type HTTPFlowUrl
- type Host
- type HybridScanTask
- type MarkdownDoc
- type MenuItem
- func GetAllMenuItem(db *gorm.DB) []*MenuItem
- func GetMenuItem(db *gorm.DB, group string, name string) (*MenuItem, error)
- func GetMenuItemById(db *gorm.DB, id int64) (*MenuItem, error)
- func NewMenuItemByBatchExecuteConfig(raw interface{}) (*MenuItem, error)
- func QueryAllMenuItemByWhere(db *gorm.DB, req *ypb.QueryAllMenuItemRequest) []*MenuItem
- type ModuleType
- type NaslScript
- func FilterRootScriptsWithDbModelType(scripts []*NaslScript) []*NaslScript
- func NewEmptyNaslScript() *NaslScript
- func NewNaslScript(name, content string) *NaslScript
- func QueryNaslScriptByName(db *gorm.DB, name string) (*NaslScript, error)
- func QueryNaslScriptByOID(db *gorm.DB, oid string) (*NaslScript, error)
- func QueryNaslScriptByYakScriptRequest(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*NaslScript, error)
- func QueryRootNaslScriptByYakScriptRequest(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*NaslScript, error)
- type NavigationBar
- type Paging
- type Payload
- func GetPayloadById(db *gorm.DB, id int64) (*Payload, error)
- func GetPayloadFirst(db *gorm.DB, group string) (*Payload, error)
- func GetPayloadsByFolder(db *gorm.DB, folder string) ([]*Payload, error)
- func GetPayloadsByGroup(db *gorm.DB, group string) ([]*Payload, error)
- func NewPayload(group string, content string) *Payload
- func QueryPayload(db *gorm.DB, folder, group, keyword string, paging *Paging) (*bizhelper.Paginator, []*Payload, error)
- func QueryPayloadWithoutPaging(db *gorm.DB, folder, group, keyword string) ([]*Payload, error)
- type PluginGroup
- type PluginScanFilter
- type Port
- type PortsTypeGroup
- type Project
- func GetCurrentProject(db *gorm.DB) (*Project, error)
- func GetDefaultProject(db *gorm.DB) (*Project, error)
- func GetProject(db *gorm.DB, params *ypb.IsProjectNameValidRequest) (*Project, error)
- func GetProjectByID(db *gorm.DB, id int64) (*Project, error)
- func GetProjectById(db *gorm.DB, id int64, Type string) (*Project, error)
- func GetProjectByName(db *gorm.DB, name string) (*Project, error)
- func GetProjectByWhere(db *gorm.DB, name string, folderID, childFolderID int64, Type string, id int64) (*Project, error)
- func GetTemporaryProject(db *gorm.DB) (*Project, error)
- func QueryProject(db *gorm.DB, params *ypb.GetProjectsRequest) (*bizhelper.Paginator, []*Project, error)
- type ProjectGeneralStorage
- type Report
- func (r *Report) BarGraphHorizontal(items ...interface{})
- func (r *Report) BarGraphVertical(items ...interface{})
- func (r *Report) Code(items interface{})
- func (r *Report) Divider()
- func (r *Report) From(i interface{}, items ...interface{})
- func (r *Report) Markdown(i string)
- func (r *Report) Owner(i interface{}, items ...interface{})
- func (r *Report) PieGraph(items ...interface{})
- func (r *Report) Raw(items interface{})
- func (r *Report) Save() int
- func (r *Report) SearchTable(i interface{}, raw ...interface{})
- func (r *Report) Table(i interface{}, raw ...interface{})
- func (r *Report) Title(i interface{}, items ...interface{})
- func (r *Report) ToRecord() (*ReportRecord, error)
- func (r *Report) WordCloud(items ...interface{})
- type ReportItem
- type ReportRecord
- type Risk
- func CreateRisk(u string, opts ...RiskParamsOpt) *Risk
- func GetRisk(db *gorm.DB, id int64) (*Risk, error)
- func GetRiskByHash(db *gorm.DB, hash string) (*Risk, error)
- func GetRisksByRuntimeId(db *gorm.DB, runtimeId string) ([]*Risk, error)
- func IsRiskExecResult(i any) (*Risk, bool)
- func NewRisk(u string, opts ...RiskParamsOpt) (*Risk, error)
- func NewUnverifiedRisk(u string, token string, opts ...RiskParamsOpt) (*Risk, error)
- func QueryNewRisk(db *gorm.DB, req *ypb.QueryNewRiskRequest, newRisk bool, isRead bool) (*bizhelper.Paginator, []*Risk, error)
- func QueryRisks(db *gorm.DB, params *ypb.QueryRisksRequest) (*bizhelper.Paginator, []*Risk, error)
- func (r *Risk) AfterCreate(tx *gorm.DB) (err error)
- func (r *Risk) AfterDelete(tx *gorm.DB) (err error)
- func (r *Risk) AfterSave(tx *gorm.DB) (err error)
- func (r *Risk) AfterUpdate(tx *gorm.DB) (err error)
- func (p *Risk) BeforeSave() error
- func (p *Risk) ColorizedShow()
- func (p *Risk) ToGRPCModel() *ypb.Risk
- 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 RssFeed
- type ScreenRecorder
- func GetOneScreenRecorder(db *gorm.DB, req *ypb.GetOneScreenRecorderRequest) (*ScreenRecorder, error)
- func GetScreenRecorder(db *gorm.DB, id int64) (*ScreenRecorder, error)
- func IsExitScreenRecorder(db *gorm.DB, id int64, order string) (*ScreenRecorder, error)
- func QueryScreenRecorder(db *gorm.DB, req *ypb.QueryScreenRecorderRequest) (*bizhelper.Paginator, []*ScreenRecorder, error)
- type SimplePort
- type StoreMeta
- type TagAndStatusCode
- type TagAndTypeValue
- type TrafficPacket
- type TrafficSession
- 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 *TrafficPacket, typeStr string, ...) (*TrafficSession, error)
- func (m *TrafficStorageManager) SaveRawPacket(packet gopacket.Packet) error
- func (m *TrafficStorageManager) SaveTCPReassembledFrame(flow *pcaputil.TrafficFlow, frame *pcaputil.TrafficFrame) error
- type TrafficTCPReassembledFrame
- type WebFuzzerLabel
- type WebFuzzerResponse
- type WebFuzzerTask
- func GetWebFuzzerTaskById(db *gorm.DB, id int) (*WebFuzzerTask, error)
- func QueryFuzzerHistoryTasks(db *gorm.DB, req *ypb.QueryHistoryHTTPFuzzerTaskExParams) (*bizhelper.Paginator, []*WebFuzzerTask, error)
- func SaveWebFuzzerTask(db *gorm.DB, req *ypb.FuzzerRequest, total int, ok bool, reason string) (*WebFuzzerTask, error)
- type WebShell
- func CreateOrUpdateWebShell(db *gorm.DB, hash string, i interface{}) (*WebShell, error)
- func QueryWebShells(db *gorm.DB, params *ypb.QueryWebShellsRequest) (*bizhelper.Paginator, []*WebShell, error)
- func UpdateWebShellById(db *gorm.DB, id int64, i interface{}) (*WebShell, error)
- func UpdateWebShellStateById(db *gorm.DB, id int64, state bool) (*WebShell, error)
- type WebsiteNextPart
- type WebsiteTree
- type WebsocketFlow
- type WebsocketFlowShare
- type YakModuleMeta
- type YakModuleParam
- type YakScript
- func GetNucleiYakScriptByName(db *gorm.DB, scriptName string) (*YakScript, error)
- func GetYakScript(db *gorm.DB, id int64) (*YakScript, error)
- func GetYakScriptByName(db *gorm.DB, name string) (*YakScript, error)
- func GetYakScriptByOnlineID(db *gorm.DB, onlineId int64) (*YakScript, error)
- func GetYakScriptByUUID(db *gorm.DB, uuid string) (*YakScript, error)
- func GetYakScriptIdOrName(db *gorm.DB, id int64, name string) (*YakScript, error)
- func GetYakScriptList(db *gorm.DB, id int64, ids []int64) ([]*YakScript, error)
- func NewTemporaryYakScript(t string, code string, suffix ...string) (*YakScript, error)
- func QueryYakScript(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*YakScript, error)
- func QueryYakScriptByIsCore(db *gorm.DB, isCore bool) []*YakScript
- func QueryYakScriptByNames(db *gorm.DB, names ...string) []*YakScript
- func (s *YakScript) AfterCreate(tx *gorm.DB) (err error)
- func (s *YakScript) AfterDelete(tx *gorm.DB) (err error)
- func (s *YakScript) AfterSave(tx *gorm.DB) (err error)
- func (s *YakScript) AfterUpdate(tx *gorm.DB) (err error)
- func (s *YakScript) BeforeSave() error
- func (s *YakScript) ToGRPCModel() *ypb.YakScript
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 ( REPORT_ITEM_TYPE_MARKDOWN = "markdown" REPORT_ITEM_TYPE_DIVIDER = "divider" REPORT_ITEM_TYPE_TABLE = "json-table" REPORT_ITEM_SEARCH_TYPE_TABLE = "search-json-table" REPORT_ITEM_TYPE_PIE_GRAPH = "pie-graph" REPORT_ITEM_TYPE_VERTICAL_BAR_GRAPH = "vertical-bar-graph" REPORT_ITEM_TYPE_HORIZONTAL_BAR_GRAPH = "horizontal-bar-graph" REPORT_ITEM_TYPE_RAW = "raw" REPORT_ITEM_TYPE_CODE = "code" REPORT_ITEM_TYPE_WORDCLOUD = "wordcloud" )
View Source
const COLORPREFIX = "YAKIT_COLOR_"
View Source
const MaxSize = 2 << 20 // 2MB
Variables ¶
View Source
var ( WebFuzzerTaskTTLCache = utils.NewTTLCache[*ypb.HistoryHTTPFuzzerTask](30 * time.Minute) WebFuzzerResponseTTLCache = utils.NewTTLCache[*ypb.FuzzerResponse](30 * time.Minute) )
View Source
var GlobalPluginScanFilter = new(PluginScanFilter)
View Source
var ProfileTables = []interface{}{ &YakScript{}, &Payload{}, &MenuItem{}, &GeneralStorage{}, &MarkdownDoc{}, &Project{}, &NavigationBar{}, &NaslScript{}, &WebFuzzerLabel{}, &PluginGroup{}, }
ProfileTables 这些表是独立与项目之外的,每一个用户的数据都不一样
View Source
var ProjectTables = []interface{}{ &WebsocketFlow{}, &HTTPFlow{}, &ExecHistory{}, &ExtractedData{}, &Port{}, &Domain{}, &Host{}, &MarkdownDoc{}, &ExecResult{}, &Risk{}, &WebFuzzerTask{}, &WebFuzzerResponse{}, &ReportRecord{}, &ScreenRecorder{}, &ProjectGeneralStorage{}, &Briefing{}, &RssFeed{}, &WebShell{}, &AliveHost{}, &TrafficSession{}, &TrafficPacket{}, &TrafficTCPReassembledFrame{}, &HybridScanTask{}, }
ProjectTables 这些表是和项目关联的,导出项目可以直接复制给用户
View Source
var ReportExports = map[string]interface{}{ "New": NewReport, }
View Source
var (
RiskTypes = make([]string, 0)
)
Functions ¶
func BatchExtractedData ¶ added in v1.2.2
func BatchExtractedData(db *gorm.DB, ctx context.Context) chan *ExtractedData
func BatchScreenRecorder ¶ added in v1.2.2
func BatchScreenRecorder(db *gorm.DB, ctx context.Context) chan *ScreenRecorder
func BatchWebsocketFlows ¶ added in v1.2.2
func BatchWebsocketFlows(db *gorm.DB, ctx context.Context) chan *WebsocketFlow
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 CheckICMPTriggerByLength ¶
func CheckICMPTriggerByLength(i int) (*tpb.ICMPTriggerNotification, error)
func CheckRandomTriggerByToken ¶
func CheckRandomTriggerByToken(t string) (*tpb.RandomPortTriggerEvent, error)
func ConfigureNetWork ¶ added in v1.3.2
func ConfigureNetWork(c *ypb.GlobalNetworkConfig)
func CopyPayloads ¶ added in v1.2.9
func CountRiskByRuntimeId ¶ added in v1.3.1
func CountYakScriptByWhere ¶ added in v1.3.1
func CreateOrUpdateAliveHost ¶ added in v1.2.7
func CreateOrUpdateDomain ¶
func CreateOrUpdateHTTPFlow ¶
func CreateOrUpdateMenuItem ¶
func CreateOrUpdateNavigation ¶ added in v1.2.3
func CreateOrUpdatePayload ¶
func CreateOrUpdatePluginGroup ¶ added in v1.3.1
func CreateOrUpdateProject ¶
func CreateOrUpdateWebFuzzerLabel ¶ added in v1.2.3
func CreateOrUpdateYakScript ¶
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 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 ExtractTokenFromUrl ¶
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 FilterNaslScript ¶ added in v1.2.2
FilterNaslScript 过滤nasl脚本,支持关键词搜索,family过滤,排除和指定脚本名
func FilterPort ¶
func FilterReportRecord ¶
func FilterYakScript ¶
func FixRiskType ¶
func FuzzParamsToGRPCFuzzableParam ¶
func FuzzParamsToGRPCFuzzableParam(r *mutate.FuzzHTTPRequestParam, isHttps bool) *ypb.FuzzableParam
func GetDefaultNetworkConfig ¶ added in v1.3.2
func GetDefaultNetworkConfig() *ypb.GlobalNetworkConfig
func GetNetworkConfig ¶ added in v1.3.2
func GetNetworkConfig() *ypb.GlobalNetworkConfig
func GetPayloadCountInGroup ¶ added in v1.2.9
func GetPayloadGroupFileName ¶ added in v1.2.9
func GetProjectKey ¶ added in v1.2.2
func GetProjectKeyWithError ¶ added in v1.2.6
func GetWebFuzzerRetryRootID ¶ added in v1.2.8
func GetWebFuzzerTasksIDByRetryRootID ¶ added in v1.2.8
func HaveReverseRisk ¶
func InitialDatabase ¶ added in v1.2.3
func InitialDatabase()
func InitializeDefaultDatabaseSchema ¶ added in v1.2.4
func InitializeDefaultDatabaseSchema()
func InitializingProjectDatabase ¶
func InitializingProjectDatabase() error
func LoadGlobalNetworkConfig ¶ added in v1.3.2
func LoadGlobalNetworkConfig()
LoadGlobalNetworkConfig load config from yakit config in db
func LoadPackage ¶
func LoadPackage(typeStr string, basePath string) (*YakScript, *MarkdownDoc, error)
func LoadYakitFromLocalDir ¶
func LoadYakitResources ¶
func LoadYakitResources(dirName string) ([]*YakScript, []*MarkdownDoc, error)
func MigrateLegacyDatabase ¶
func MigrateLegacyDatabase() error
func MovePayloads ¶ added in v1.2.9
func NewDNSLogDomain ¶
func NewLocalReverseProtoUrl ¶
func NewLocalReverseProtoUrl(proto string) func(opts ...RiskParamsOpt) string
func NewPublicReverseProtoUrl ¶
func NewPublicReverseProtoUrl(proto string) func(opts ...RiskParamsOpt) string
func NewRandomPortTrigger ¶
func NewRandomPortTrigger(opt ...RiskParamsOpt) (token string, addr string, _ error)
func NewRiskReadRequest ¶
func QueryExportYakScript ¶ added in v1.3.0
func QueryFirst50WebFuzzerTask ¶
func QueryFirst50WebFuzzerTask(db *gorm.DB) []*ypb.HistoryHTTPFuzzerTask
Deprecated
func QueryPayloadWithCallBack ¶ added in v1.3.0
func QueryProjectTotal ¶
func QueryWebFuzzerLabelCount ¶ added in v1.2.3
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 RegisterBeforeRiskSave(f func(*Risk))
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 SaveHybridScanTask ¶ added in v1.2.9
func SaveHybridScanTask(db *gorm.DB, task *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 *TrafficPacket) error
func SaveTrafficSession ¶ added in v1.2.8
func SaveTrafficSession(db *gorm.DB, session *TrafficSession) error
func SaveWebFuzzerResponse ¶
func SaveWebFuzzerResponse(db *gorm.DB, taskId int, rsp *ypb.FuzzerResponse)
func SearchWebsocketFlow ¶ added in v1.3.1
func SetGlobalPluginScanLists ¶ added in v1.3.2
func SetGlobalPluginScanLists(whitelist, blacklist []string)
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 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 UpdatePayloadColumns ¶ added in v1.3.0
func UpdatePayloadGroup ¶ added in v1.2.9
func UpdateProjectDatabasePath ¶ added in v1.3.1
func YakScriptLocalTotal ¶ added in v1.3.0
func YakScriptLocalType ¶ added in v1.3.0
func YieldAliveHostRuntimeId ¶ added in v1.2.7
func YieldGeneralStorages ¶
func YieldGeneralStorages(db *gorm.DB, ctx context.Context) chan *GeneralStorage
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 AliveHost ¶ added in v1.2.7
type AliveHost struct { gorm.Model Hash string `json:"hash"` IP string `json:"ip"` IPInteger int64 `json:"ip_integer"` // 设置运行时 ID 为了关联具体漏洞 RuntimeId string `json:"runtime_id"` }
func NewAliveHost ¶ added in v1.2.7
func NewAliveHost(u string, opts ...AliveHostParamsOpt) (*AliveHost, error)
type AliveHostParamsOpt ¶ added in v1.2.7
type AliveHostParamsOpt func(r *AliveHost)
type BackProject ¶
func GetProjectDetail ¶
func GetProjectDetail(db *gorm.DB, id int64) (*BackProject, error)
func (*BackProject) BackGRPCModel ¶
func (p *BackProject) BackGRPCModel() *ypb.ProjectDescription
type Briefing ¶
type Briefing struct { gorm.Model SourceXmlUrl string RssFeedHash string Hash string `gorm:"columns:hash;unique_index"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Content string `json:"content,omitempty"` Link string `json:"link,omitempty"` Updated string `json:"updated,omitempty"` UpdatedParsed *time.Time `json:"updatedParsed,omitempty"` Published string `json:"published,omitempty"` PublishedParsed *time.Time `json:"publishedParsed,omitempty"` Author string `json:"author,omitempty"` AuthorEmail string `json:"author_email,omitempty"` GUID string `json:"guid,omitempty"` ImageUrl string `json:"image_url,omitempty"` ImageName string `json:"image_name,omitempty"` Categories string `json:"categories,omitempty"` Tags string `json:"tags"` IsRead bool `json:"is_read"` }
func (*Briefing) BeforeSave ¶
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 Domain ¶
type Domain struct { gorm.Model Domain string `json:"domain" gorm:"index"` IPAddr string `json:"ip_addr"` IPInteger int64 `json:"ip_integer"` HTTPTitle string Hash string `json:"hash" gorm:"unique_index"` Tags string `json:"tags"` }
func QueryDomain ¶
func (*Domain) BeforeSave ¶
func (*Domain) FillDomainHTTPInfo ¶
func (d *Domain) FillDomainHTTPInfo()
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 ExecHistory ¶
type ExecHistory struct { gorm.Model Hash string `gorm:"unique_index"` RuntimeId string `json:"runtime_id" gorm:"unique_index"` Script string `json:"script"` ScriptId string `json:"script_id" gorm:"index"` TimestampNano int64 `json:"timestamp"` FromYakModule string `json:"from_yak_module" gorm:"index"` DurationMs int64 `json:"duration_ms"` Params string `json:"params"` Stdout string `json:"stdout"` Stderr string `json:"stderr"` Ok bool `json:"ok"` Reason string `json:"reason"` StdoutLen int64 `json:"stdout_len" gorm:"-"` StderrLen int64 `json:"stderr_len" gorm:"-"` // json Messages string `json:"messages"` }
func GetExecHistory ¶
func GetExecHistory(db *gorm.DB, id int64) (*ExecHistory, error)
func QueryExecHistory ¶
func QueryExecHistory(db *gorm.DB, params *ypb.ExecHistoryRequest) (*bizhelper.Paginator, []*ExecHistory, error)
func (*ExecHistory) BeforeSave ¶
func (f *ExecHistory) BeforeSave() error
func (*ExecHistory) CalcHash ¶
func (f *ExecHistory) CalcHash() string
func (*ExecHistory) ToGRPCModel ¶
func (f *ExecHistory) ToGRPCModel() *ypb.ExecHistoryRecord
type ExecResult ¶
type ExecResult struct { gorm.Model YakScriptName string `json:"yak_script_name" gorm:"index"` Raw string `json:"raw"` }
func GetExecResult ¶
func GetExecResult(db *gorm.DB, id int64) (*ExecResult, error)
func QueryExecResult ¶
func QueryExecResult(db *gorm.DB, params *ypb.QueryYakScriptExecResultRequest) (*bizhelper.Paginator, []*ExecResult, error)
func (*ExecResult) ToGRPCModel ¶
func (e *ExecResult) ToGRPCModel() *ypb.ExecResult
type ExtractedData ¶
type ExtractedData struct { gorm.Model // sourcetype 一般来说是标注数据来源 SourceType string `gorm:"index"` // trace id 表示数据源的 ID TraceId string `gorm:"index"` // 提取数据的正则数据 Regexp string // 规则 Verbose RuleVerbose string // UTF8 safe escape Data string }
func ExtractedDataFromHTTPFlow ¶ added in v1.2.7
func ExtractedDataFromHTTPFlow(flowHash string, ruleName string, data string, regexpStr ...string) *ExtractedData
func GetExtractedData ¶
func GetExtractedData(db *gorm.DB, id int64) (*ExtractedData, error)
func QueryExtractedData ¶
func QueryExtractedData(db *gorm.DB, req *ypb.QueryMITMRuleExtractedDataRequest) (*bizhelper.Paginator, []*ExtractedData, error)
type GeneralStorage ¶
type GeneralStorage struct { gorm.Model Key string `json:"key" gorm:"unique_index"` // 经过 JSON + Strconv Value string `json:"value"` // 过期时间 ExpiredAt time.Time // YAKIT SUBPROC_ENV ProcessEnv bool // 帮助信息,描述这个变量是干嘛的 Verbose string // 描述变量所在的组是啥 Group string }
func GetKeyModel ¶
func GetKeyModel(db *gorm.DB, key interface{}) (*GeneralStorage, error)
func GetProcessEnvKey ¶
func GetProcessEnvKey(db *gorm.DB) []*GeneralStorage
func (*GeneralStorage) EnableProcessEnv ¶
func (s *GeneralStorage) EnableProcessEnv()
func (*GeneralStorage) ToGRPCModel ¶
func (s *GeneralStorage) ToGRPCModel() *ypb.GeneralStorage
type HTTPFlow ¶
type HTTPFlow struct { gorm.Model HiddenIndex string NoFixContentLength bool `json:"no_fix_content_length"` Hash string `gorm:"unique_index"` IsHTTPS bool Url string `gorm:"index"` Path string Method string BodyLength int64 ContentType string StatusCode int64 SourceType string Request string Response string GetParamsTotal int PostParamsTotal int CookieParamsTotal int IPAddress string RemoteAddr string IPInteger int Tags string // 用来打标! // Websocket 相关字段 IsWebsocket bool // 用来计算 websocket hash, 每次连接都不一样,一般来说,内部对象 req 指针足够了 WebsocketHash string RuntimeId string FromPlugin string // friendly for gorm build instance, not for store // 这两个字段不参与数据库存储,但是在序列化的时候,会被覆盖 // 主要用来标记用户的 Request 和 Response 是否超大 IsRequestOversize bool `gorm:"-"` IsResponseOversize bool `gorm:"-"` IsTooLargeResponse bool TooLargeResponseHeaderFile string TooLargeResponseBodyFile string }
func CreateHTTPFlow ¶ added in v1.3.2
func CreateHTTPFlow(opts ...CreateHTTPFlowOptions) (*HTTPFlow, error)
func CreateHTTPFlowFromHTTPWithNoRspSaved ¶ added in v1.2.4
func ExportHTTPFlow ¶ added in v1.3.0
func GetHTTPFlowByIDOrHash ¶ added in v1.3.1
func QueryHTTPFlow ¶
func SaveFromHTTP ¶
func SaveFromHTTPFromRaw ¶
func (*HTTPFlow) AddTagToFirst ¶
func (*HTTPFlow) AfterCreate ¶ added in v1.3.2
func (*HTTPFlow) AfterDelete ¶ added in v1.3.2
func (*HTTPFlow) AfterUpdate ¶ added in v1.3.2
func (*HTTPFlow) BeforeSave ¶
func (*HTTPFlow) CalcCacheHash ¶ added in v1.2.7
func (*HTTPFlow) ColorSharp ¶
func (*HTTPFlow) FixHTTPRequest ¶ added in v1.3.2
func (*HTTPFlow) RemoveColor ¶
func (f *HTTPFlow) RemoveColor()
func (*HTTPFlow) SetCacheGRPCModel ¶ added in v1.3.2
type HTTPFlowUrl ¶
type HTTPFlowUrl struct {
Url string `json:"url"`
}
type Host ¶
type HybridScanTask ¶ added in v1.2.9
type HybridScanTask struct { gorm.Model TaskId string `gorm:"unique_index"` // executing // paused // done Status string Reason string // user cancel / finished / recover failed so on SurvivalTaskIndexes string // 暂停的时候正在执行的任务 // struct{ https bool; request bytes }[] Targets string // string[] Plugins string TotalTargets int64 TotalPlugins int64 TotalTasks int64 FinishedTasks int64 FinishedTargets int64 ScanConfig []byte }
func GetHybridScanByTaskId ¶ added in v1.2.9
func GetHybridScanByTaskId(db *gorm.DB, taskId string) (*HybridScanTask, error)
func QueryHybridScan ¶ added in v1.2.9
func QueryHybridScan(db *gorm.DB, query *ypb.QueryHybridScanTaskRequest) (*bizhelper.Paginator, []*HybridScanTask, error)
type MarkdownDoc ¶
type MarkdownDoc struct { gorm.Model YakScriptId int64 `json:"yak_script_id" gorm:"index"` YakScriptName string `json:"yak_script_name" gorm:"index"` Markdown string `json:"markdown"` }
func GetMarkdownDoc ¶
func GetMarkdownDoc(db *gorm.DB, id int64) (*MarkdownDoc, error)
func GetMarkdownDocByName ¶
type MenuItem ¶
type MenuItem struct { gorm.Model Group string `json:"group" ` Verbose string `json:"verbose"` YakScriptName string `json:"yak_script_name"` Hash string `json:"-" gorm:"unique_index"` // quoted json BatchPluginFilterJson string `json:"batch_plugin_filter_json"` Mode string `json:"mode"` MenuSort int64 `json:"menu_sort"` GroupSort int64 `json:"group_sort"` }
func GetAllMenuItem ¶
func QueryAllMenuItemByWhere ¶
func QueryAllMenuItemByWhere(db *gorm.DB, req *ypb.QueryAllMenuItemRequest) []*MenuItem
func (*MenuItem) BeforeSave ¶
type ModuleType ¶
type NaslScript ¶
type NaslScript struct { gorm.Model OriginFileName string `json:"origin_file_name"` Hash string `json:"hash" gorm:"unique_index"` OID string `json:"oid"` CVE string `json:"cve"` ScriptName string `json:"script_name"` Script string `json:"script"` Tags string `json:"tags,omitempty"` Version string `json:"version"` Category string `json:"category"` Family string `json:"family"` Copyright string `json:"copyright"` Dependencies string `json:"dependencies,omitempty"` RequirePorts string `json:"require_ports,omitempty"` RequireUdpPorts string `json:"require_udp_ports,omitempty"` ExcludeKeys string `json:"exclude_keys,omitempty"` Xref string `json:"xref,omitempty"` Preferences string `json:"preferences,omitempty"` BugtraqId string `json:"bugtraqId,omitempty"` MandatoryKeys string `json:"mandatory_keys,omitempty"` Timeout int `json:"timeout,omitempty"` RequireKeys string `json:"require_keys,omitempty"` }
func FilterRootScriptsWithDbModelType ¶ added in v1.2.2
func FilterRootScriptsWithDbModelType(scripts []*NaslScript) []*NaslScript
func NewEmptyNaslScript ¶
func NewEmptyNaslScript() *NaslScript
func NewNaslScript ¶
func NewNaslScript(name, content string) *NaslScript
func QueryNaslScriptByName ¶ added in v1.2.2
func QueryNaslScriptByName(db *gorm.DB, name string) (*NaslScript, error)
func QueryNaslScriptByOID ¶ added in v1.2.2
func QueryNaslScriptByOID(db *gorm.DB, oid string) (*NaslScript, error)
func QueryNaslScriptByYakScriptRequest ¶ added in v1.2.2
func QueryNaslScriptByYakScriptRequest(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*NaslScript, error)
func QueryRootNaslScriptByYakScriptRequest ¶ added in v1.2.2
func QueryRootNaslScriptByYakScriptRequest(db *gorm.DB, params *ypb.QueryYakScriptRequest) (*bizhelper.Paginator, []*NaslScript, error)
func (*NaslScript) CalcHash ¶
func (p *NaslScript) CalcHash() string
func (*NaslScript) CreateOrUpdateNaslScript ¶
func (p *NaslScript) CreateOrUpdateNaslScript(db *gorm.DB) error
func (*NaslScript) ToYakScript ¶ added in v1.2.2
func (p *NaslScript) ToYakScript() *YakScript
type NavigationBar ¶ added in v1.2.3
type NavigationBar struct {}
func GetAllNavigation ¶ added in v1.2.3
func GetAllNavigation(db *gorm.DB, req *ypb.GetAllNavigationRequest) []*NavigationBar
func (*NavigationBar) CalcHash ¶ added in v1.2.3
func (m *NavigationBar) CalcHash() string
type Payload ¶
type Payload struct { gorm.Model // Must: payload group Group string `json:"group" gorm:"index"` // payload folder Folder *string `json:"folder" gorm:"column:folder;default:''"` // default empty string GroupIndex *int64 `json:"group_index" gorm:"column:group_index;default:0"` // default 0 // strconv Quoted // Must: payload data Content *string `json:"content"` // hit count HitCount *int64 `json:"hit_count" gorm:"column:hit_count;default:0"` // default 0 // the group save in file only contain one payload, and this `payload.IsFile = true` `payload.Content` is filepath IsFile *bool `json:"is_file" gorm:"column:is_file;default:false"` // default false // Hash string Hash string `json:"hash" gorm:"unique_index"` }
func GetPayloadFirst ¶ added in v1.3.0
func GetPayloadsByFolder ¶ added in v1.2.9
func GetPayloadsByGroup ¶ added in v1.2.9
func QueryPayload ¶
func QueryPayloadWithoutPaging ¶ added in v1.3.0
func (*Payload) BeforeCreate ¶ added in v1.3.0
func (*Payload) BeforeSave ¶
func (*Payload) BeforeUpdate ¶ added in v1.2.9
type PluginGroup ¶ added in v1.3.1
type PluginGroup struct { gorm.Model YakScriptName string `json:"yak_script_name" gorm:"index"` Group string `json:"group"` Hash string `json:"hash" gorm:"unique_index"` TemporaryId string `json:"temporary_id"` IsPocBuiltIn bool `json:"is_poc_built_in"` }
func GetGroup ¶ added in v1.3.1
func GetGroup(db *gorm.DB, scriptNames []string) (req []*PluginGroup, err error)
func GetPluginByGroup ¶ added in v1.3.1
func GetPluginByGroup(db *gorm.DB, group string) (req []*PluginGroup, err error)
func (*PluginGroup) CalcHash ¶ added in v1.3.1
func (p *PluginGroup) CalcHash() string
type PluginScanFilter ¶ added in v1.3.2
type Port ¶
type Port struct { gorm.Model Host string `json:"host" gorm:"index"` IPInteger int `json:"ip_integer" gorm:"column:ip_integer" json:"ip_integer"` Port int `json:"port" gorm:"index"` Proto string `json:"proto"` ServiceType string `json:"service_type"` State string `json:"state"` Reason string `json:"reason"` Fingerprint string `json:"fingerprint"` CPE string `json:"cpe"` HtmlTitle string `json:"html_title"` From string `json:"from"` Hash string `json:"hash"` TaskName string `json:"task_name"` // runtime id 运行时 ID RuntimeId string `json:"runtime_id"` }
func QueryPorts ¶
func (*Port) BeforeSave ¶
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 Project ¶
type Project struct { gorm.Model ProjectName string Description string DatabasePath string IsCurrentProject bool FolderID int64 ChildFolderID int64 Type string }
Project 描述一个 Yakit 项目 一般项目数据都是应该用 ProjectDatabase 作为连接的 但是项目本身的元数据应该存在 ProfileDatabase 中
func GetProject ¶
func GetProjectByWhere ¶
func QueryProject ¶
func (*Project) ToGRPCModel ¶
func (p *Project) ToGRPCModel() *ypb.ProjectDescription
type ProjectGeneralStorage ¶ added in v1.2.2
type ProjectGeneralStorage struct { gorm.Model Key string `json:"key" gorm:"unique_index"` // 经过 JSON + Strconv Value string `json:"value"` // 过期时间 ExpiredAt time.Time // YAKIT SUBPROC_ENV ProcessEnv bool // 帮助信息,描述这个变量是干嘛的 Verbose string // 描述变量所在的组是啥 Group string }
func GetProjectKeyByWhere ¶ added in v1.2.7
func GetProjectKeyByWhere(db *gorm.DB, key []string) ([]*ProjectGeneralStorage, error)
func GetProjectKeyModel ¶ added in v1.2.2
func GetProjectKeyModel(db *gorm.DB, key interface{}) (*ProjectGeneralStorage, error)
type Report ¶
type Report struct { TitleValue string `json:"title"` OwnerValue string `json:"owner"` FromValue string `json:"from"` Items []*ReportItem `json:"items"` }
func (*Report) BarGraphHorizontal ¶
func (r *Report) BarGraphHorizontal(items ...interface{})
func (*Report) BarGraphVertical ¶
func (r *Report) BarGraphVertical(items ...interface{})
func (*Report) SearchTable ¶ added in v1.2.4
func (r *Report) SearchTable(i interface{}, raw ...interface{})
func (*Report) ToRecord ¶
func (r *Report) ToRecord() (*ReportRecord, error)
type ReportItem ¶
type ReportRecord ¶
type ReportRecord struct { gorm.Model Title string PublishedAt time.Time `json:"published_at"` Hash string `json:"hash" gorm:"unique_index"` Owner string `json:"owner"` From string `json:"from"` QuotedJson string `json:"quoted_json"` }
func GetReportRecord ¶
func GetReportRecord(db *gorm.DB, id int64) (*ReportRecord, error)
func GetReportRecordByHash ¶
func GetReportRecordByHash(db *gorm.DB, id string) (*ReportRecord, error)
func QueryReportRecord ¶
func QueryReportRecord(db *gorm.DB, params *ypb.QueryReportsRequest) (*bizhelper.Paginator, []*ReportRecord, error)
func (*ReportRecord) BeforeSave ¶
func (r *ReportRecord) BeforeSave()
func (*ReportRecord) CalcHash ¶
func (r *ReportRecord) CalcHash() string
func (*ReportRecord) ToGRPCModel ¶
func (i *ReportRecord) ToGRPCModel() *ypb.Report
func (*ReportRecord) ToReport ¶
func (r *ReportRecord) ToReport() (*Report, error)
type Risk ¶
type Risk struct { gorm.Model Hash string `json:"hash"` // essential IP string `json:"ip"` IPInteger int64 `json:"ip_integer"` // extraTargets Url string `json:"url"` Port int `json:"port"` Host string `json:"host"` // Title string `json:"title"` TitleVerbose string `json:"title_verbose"` Description string `json:"description"` Solution string `json:"solution"` RiskType string `json:"risk_type"` RiskTypeVerbose string `json:"risk_verbose"` Parameter string `json:"parameter"` Payload string `json:"payload"` Details string `json:"details"` Severity string `json:"severity"` // 来源于哪个插件? FromYakScript string `json:"from_yak_script"` // 等待验证中? WaitingVerified bool `json:"waiting_verified"` // 用于验证的 ReverseToken ReverseToken string `json:"reverse_token"` // 设置运行时 ID 为了关联具体漏洞 RuntimeId string `json:"runtime_id"` QuotedRequest string `json:"quoted_request"` QuotedResponse string `json:"quoted_response"` // 潜在威胁:用于输出合规性质的漏洞内容 IsPotential bool `json:"is_potential"` CVE string `json:"cve"` IsRead bool `json:"is_read"` Ignore bool `json:"ignore"` UploadOnline bool `json:"upload_online"` TaskName string `json:"task_name"` CveAccessVector string `json:"cve_access_vector"` CveAccessComplexity string `json:"cve_access_complexity"` }
func CreateRisk ¶
func CreateRisk(u string, opts ...RiskParamsOpt) *Risk
func GetRisksByRuntimeId ¶ added in v1.3.1
func IsRiskExecResult ¶ added in v1.3.2
func NewUnverifiedRisk ¶
func NewUnverifiedRisk(u string, token string, opts ...RiskParamsOpt) (*Risk, error)
func QueryNewRisk ¶
func QueryRisks ¶
func (*Risk) BeforeSave ¶
func (*Risk) ColorizedShow ¶ added in v1.3.2
func (p *Risk) ColorizedShow()
func (*Risk) ToGRPCModel ¶
type RiskParamsOpt ¶
type RiskParamsOpt func(r *Risk)
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 RssFeed ¶
type RssFeed struct { gorm.Model SourceXmlUrl string Hash string `gorm:"columns:hash;unique_index"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Link string `json:"link,omitempty"` FeedLink string `json:"feedLink,omitempty"` Updated string `json:"updated,omitempty"` UpdatedParsed *time.Time `json:"updatedParsed,omitempty"` Published string `json:"published,omitempty"` PublishedParsed *time.Time `json:"publishedParsed,omitempty"` Author string `json:"author,omitempty"` AuthorEmail string `json:"author_email,omitempty"` Language string `json:"language,omitempty"` ImageUrl string `json:"image_url,omitempty"` ImageName string `json:"image_name,omitempty"` Copyright string `json:"copyright,omitempty"` Generator string `json:"generator,omitempty"` Categories string `json:"categories,omitempty"` FeedType string `json:"feedType"` FeedVersion string `json:"feedVersion"` }
func (*RssFeed) BeforeSave ¶
type ScreenRecorder ¶
type ScreenRecorder struct { gorm.Model // 保存到本地的路径 Filename string NoteInfo string Project string Hash string `json:"hash" gorm:"unique_index"` VideoName string Cover string `gorm:"type:longtext"` Duration string }
func GetOneScreenRecorder ¶ added in v1.2.2
func GetOneScreenRecorder(db *gorm.DB, req *ypb.GetOneScreenRecorderRequest) (*ScreenRecorder, error)
func GetScreenRecorder ¶
func GetScreenRecorder(db *gorm.DB, id int64) (*ScreenRecorder, error)
func IsExitScreenRecorder ¶ added in v1.2.2
func QueryScreenRecorder ¶
func QueryScreenRecorder(db *gorm.DB, req *ypb.QueryScreenRecorderRequest) (*bizhelper.Paginator, []*ScreenRecorder, error)
func (*ScreenRecorder) BeforeSave ¶
func (s *ScreenRecorder) BeforeSave() error
func (*ScreenRecorder) CalcHash ¶
func (s *ScreenRecorder) CalcHash() string
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 YakScriptTags ¶
func YakScriptType ¶
func YakScriptType(db *gorm.DB) (req []*TagAndTypeValue, err error)
type TrafficPacket ¶ added in v1.2.8
type TrafficPacket struct { gorm.Model SessionUuid string `gorm:"index"` LinkLayerType string NetworkLayerType string TransportLayerType string ApplicationLayerType string Payload string // QuotedRaw contains the raw bytes of the packet, quoted such that it can be // caution: QuotedRaw is (maybe) not an utf8-valid string // quoted-used for save to database QuotedRaw string EthernetEndpointHardwareAddrSrc string EthernetEndpointHardwareAddrDst string IsIpv4 bool IsIpv6 bool NetworkEndpointIPSrc string NetworkEndpointIPDst string TransportEndpointPortSrc int TransportEndpointPortDst int }
func QueryTrafficPacket ¶ added in v1.2.8
func QueryTrafficPacket(db *gorm.DB, request *ypb.QueryTrafficPacketRequest) (*bizhelper.Paginator, []*TrafficPacket, error)
type TrafficSession ¶ added in v1.2.8
type TrafficSession struct { gorm.Model Uuid string `gorm:"index"` // Traffic SessionType Means a TCP Session / ICMP Request-Response / UDP Request-Response // DNS Request-Response // HTTP Request-Response // we can't treat Proto as any transport layer proto or application layer proto // because we can't know the proto of a packet before we parse it // // just use session type as a hint / verbose to group some frames(packets). // // 1. tcp (reassembled) // 2. udp (try figure out request-response) // 3. dns // 4. http (flow) // 5. icmp (request-response) // 6. sni (tls client hello) SessionType string `gorm:"index"` DeviceName string `gorm:"index"` DeviceType string // LinkLayer physical layer IsLinkLayerEthernet bool LinkLayerSrc string LinkLayerDst string // NetworkLayer network layer IsIpv4 bool IsIpv6 bool NetworkSrcIP string NetworkSrcIPInt int64 NetworkDstIP string NetworkDstIPInt int64 // TransportLayer transport layer IsTcpIpStack bool TransportLayerSrcPort int TransportLayerDstPort int // TCP State Flags // PDU Reassembled IsTCPReassembled bool // TCP SYN Detected? If so, it's a new TCP Session // 'half' means we haven't seen a FIN or RST IsHalfOpen bool // TCP FIN Detected IsClosed bool // TCP RST Detected IsForceClosed bool // TLS ClientHello HaveClientHello bool SNI string }
func QueryTrafficSession ¶ added in v1.2.8
func QueryTrafficSession(db *gorm.DB, request *ypb.QueryTrafficSessionRequest) (*bizhelper.Paginator, []*TrafficSession, error)
func QueryTrafficSessionByUUID ¶ added in v1.3.0
func QueryTrafficSessionByUUID(db *gorm.DB, uuid string) (*TrafficSession, 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 *TrafficPacket, typeStr string, noCreate bool) (*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 TrafficTCPReassembledFrame ¶ added in v1.2.8
type TrafficTCPReassembledFrame struct { gorm.Model SessionUuid string `gorm:"index"` QuotedData string Seq int64 Timestamp int64 Source string Destination string }
func QueryTrafficTCPReassembled ¶ added in v1.2.8
func QueryTrafficTCPReassembled(db *gorm.DB, request *ypb.QueryTrafficTCPReassembledRequest) (*bizhelper.Paginator, []*TrafficTCPReassembledFrame, error)
type WebFuzzerLabel ¶ added in v1.2.3
type WebFuzzerLabel struct { gorm.Model Label string `json:"label"` // 模版数据唯一标识,用来兼容做对比 DefaultDescription string `json:"default_description"` Description string `json:"description"` Hash string `gorm:"unique_index"` }
func QueryWebFuzzerLabel ¶ added in v1.2.3
func QueryWebFuzzerLabel(db *gorm.DB) ([]*WebFuzzerLabel, error)
func (*WebFuzzerLabel) CalcHash ¶ added in v1.2.3
func (w *WebFuzzerLabel) CalcHash() string
type WebFuzzerResponse ¶
type WebFuzzerResponse struct { gorm.Model WebFuzzerTaskId int `json:"web_fuzzer_task_id" gorm:"index"` OK bool `json:"ok"` Request string `json:"request"` Content string `json:"content"` Payload string `json:"payload"` Url string `json:"url"` StatusCode int `json:"status_code"` DurationMs int `json:"duration_ms"` Timestamp int64 `json:"timestamp"` }
func QueryWebFuzzerResponse ¶
func QueryWebFuzzerResponse(db *gorm.DB, params *ypb.QueryHTTPFuzzerResponseByTaskIdRequest) (*bizhelper.Paginator, []*WebFuzzerResponse, error)
func (*WebFuzzerResponse) CalcCacheHash ¶ added in v1.2.8
func (w *WebFuzzerResponse) CalcCacheHash() string
func (*WebFuzzerResponse) ToGRPCModel ¶
func (w *WebFuzzerResponse) ToGRPCModel() (*ypb.FuzzerResponse, error)
type WebFuzzerTask ¶
type WebFuzzerTask struct { gorm.Model // 原始请求 json+quote RawFuzzTaskRequest string `json:"raw_fuzz_task_request"` // 对应前端的组织形式 FuzzerIndex string `json:"fuzzer_index"` FuzzerTabIndex string `json:"fuzzer_tab_index"` // HTTP 数据流总量 HTTPFlowTotal int `json:"http_flow_total"` HTTPFlowSuccessCount int `json:"http_flow_success_count"` HTTPFlowFailedCount int `json:"http_flow_failed_count"` Ok bool `json:"ok"` Reason string `json:"reason"` // if not ok Host string `json:"host"` Port int `json:"port"` // retry 相关 RetryRootID uint `json:"retry_root_id"` }
这个结构用于保存当前测试的结果
包含:基本参数+请求数据
耗时+执行结果
执行结果包含,失败原因与执行成功的原因。
总共有多少个请求
func GetWebFuzzerTaskById ¶
func GetWebFuzzerTaskById(db *gorm.DB, id int) (*WebFuzzerTask, error)
func QueryFuzzerHistoryTasks ¶
func QueryFuzzerHistoryTasks(db *gorm.DB, req *ypb.QueryHistoryHTTPFuzzerTaskExParams) (*bizhelper.Paginator, []*WebFuzzerTask, error)
func SaveWebFuzzerTask ¶
func SaveWebFuzzerTask(db *gorm.DB, req *ypb.FuzzerRequest, total int, ok bool, reason string) (*WebFuzzerTask, error)
func (*WebFuzzerTask) CalcCacheHash ¶ added in v1.2.8
func (w *WebFuzzerTask) CalcCacheHash() string
func (*WebFuzzerTask) ToGRPCModel ¶ added in v1.2.8
func (w *WebFuzzerTask) ToGRPCModel() *ypb.HistoryHTTPFuzzerTask
func (*WebFuzzerTask) ToGRPCModelDetail ¶ added in v1.2.8
func (w *WebFuzzerTask) ToGRPCModelDetail() *ypb.HistoryHTTPFuzzerTaskDetail
type WebShell ¶ added in v1.3.0
type WebShell struct { gorm.Model Url string `json:"url" gorm:"index" ` // pass=payload Pass string `json:"pass"` // 加密密钥 SecretKey string `json:"secret_key" gorm:"not null"` // 加密模式 EncryptedMode string `json:"enc_mode" gorm:"column:enc_mode"` // 字符集编码 Charset string `json:"charset" gorm:"default:'UTF-8'"` // 冰蝎还是哥斯拉,或者是其他 ShellType string `json:"shell_type"` // 脚本语言 ShellScript string `json:"shell_script"` Headers string `json:"headers" gorm:"type:json"` Status bool `json:"status"` Tag string `json:"tag"` Proxy string `json:"proxy"` Remark string `json:"remark"` Hash string `json:"hash"` PacketCodecName string `json:"packet_codec_name"` PayloadCodecName string `json:"payload_codec_name"` }
func CreateOrUpdateWebShell ¶ added in v1.3.0
func QueryWebShells ¶ added in v1.3.0
func UpdateWebShellById ¶ added in v1.3.0
func UpdateWebShellStateById ¶ added in v1.3.0
func (*WebShell) BeforeSave ¶ added in v1.3.0
func (*WebShell) ToGRPCModel ¶ added in v1.3.0
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 WebsocketFlow ¶
type WebsocketFlow struct { gorm.Model // HTTPFlow 过来的应该有 WebsocketHash WebsocketRequestHash string `json:"websocket_request_hash" gorm:"index"` FrameIndex int `json:"frame_index" gorm:"index"` FromServer bool `json:"from_server"` QuotedData string `json:"quoted_data"` MessageType string `json:"message_type"` Hash string `json:"hash"` }
func GetWebsocketFlow ¶
func GetWebsocketFlow(db *gorm.DB, id int64) (*WebsocketFlow, error)
func (*WebsocketFlow) BeforeSave ¶
func (f *WebsocketFlow) BeforeSave() error
func (*WebsocketFlow) CalcHash ¶
func (f *WebsocketFlow) CalcHash() string
func (*WebsocketFlow) ToGRPCModel ¶
func (i *WebsocketFlow) ToGRPCModel() *ypb.WebsocketFlow
type WebsocketFlowShare ¶ added in v1.2.2
type WebsocketFlowShare struct { string }WebsocketRequestHash
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"` }
type YakScript ¶
type YakScript struct { gorm.Model ScriptName string `json:"script_name" gorm:"unique_index"` Type string `json:"type" gorm:"index"` Content string `json:"content"` Level string `json:"level"` Params string `json:"params"` Help string `json:"help"` Author string `json:"author"` Tags string `json:"tags,omitempty"` Ignored bool `json:"ignore"` // 加载本地的数据 FromLocal bool `json:"from_local"` LocalPath string `json:"local_path"` // History string IsHistory bool `json:"is_history"` // Force Interactive // Means that this script will be executed in interactive mode // cannot load as a plugin or a module by mix caller ForceInteractive bool `json:"force_interactive"` FromStore bool `json:"from_store"` IsGeneralModule bool `json:"is_general_module"` GeneralModuleVerbose string `json:"general_module_verbose"` GeneralModuleKey string `json:"general_module_key"` FromGit string `json:"from_git"` // 这个是自动填写的,一般不需要自己来填写 // 条件是 Params 中有一个名字为 target 的必填参数 IsBatchScript bool `json:"is_batch_script"` IsExternal bool `json:"is_external"` EnablePluginSelector bool `json:"enable_plugin_selector"` PluginSelectorTypes string `json:"plugin_selector_types"` // Online ID: 线上插件的 ID OnlineId int64 `json:"online_id"` OnlineScriptName string `json:"online_script_name"` OnlineContributors string `json:"online_contributors"` OnlineIsPrivate bool `json:"online_is_private"` // 这个插件所属用户 ID UserId int64 `json:"user_id"` // 这个插件的 UUID Uuid string `json:"uuid"` HeadImg string `json:"head_img"` OnlineBaseUrl string `json:"online_base_url"` BaseOnlineId int64 `json:"BaseOnlineId"` OnlineOfficial bool `json:"online_official"` OnlineGroup string `json:"online_group"` IsCorePlugin bool `json:"is_core_plugin"` // 判断是否是核心插件 // 废弃字段 RiskType string `json:"risk_type"` // 漏洞详情 建议,描述,cwe RiskDetail string `json:"risk_detail"` // 漏洞类型-补充说明 废弃 RiskAnnotation string `json:"risk_annotation"` // 协作者 CollaboratorInfo string `json:"collaborator_info"` // contains filtered or unexported fields }
func GetNucleiYakScriptByName ¶
GetNucleiYakScriptByName
func GetYakScriptByOnlineID ¶
func GetYakScriptIdOrName ¶
func GetYakScriptList ¶
func NewTemporaryYakScript ¶ added in v1.3.2
func QueryYakScript ¶
func QueryYakScriptByIsCore ¶ added in v1.2.4
func (*YakScript) AfterCreate ¶ added in v1.3.2
func (*YakScript) AfterDelete ¶ added in v1.3.2
func (*YakScript) AfterUpdate ¶ added in v1.3.2
func (*YakScript) BeforeSave ¶
func (*YakScript) ToGRPCModel ¶
Source Files ¶
- aliveHost.go
- aliveHost_exports.go
- base.go
- doc.go
- domain.go
- duplex_conn.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
- profile_database_models.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.